home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1992-10-02 | 139.5 KB | [STAK/WILD] |
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: HyperWais 12
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| HyperCard Stack (archive/hypercard)
| idMeta
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Sun Oct 6 09:20:04 1991, modified Fri Oct 2 10:31:02 1992, creator HyperCard, type HyperCard stack, 90112 bytes "HyperWais 12" , at 0x16080 52490 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Mac HyperCard stack (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [STAK] |
macFileCreator | [WILD] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 48 79 70 65 72 57 | 61 69 73 20 31 32 00 00 |..HyperW|ais 12..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 53 54 41 4b 57 49 4c | 44 01 00 00 00 00 00 00 |.STAKWIL|D.......|
|00000050| 00 00 00 00 01 60 00 00 | 00 cd 0a a5 14 be 04 a6 |.....`..|........|
|00000060| f2 0d a6 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 22 39 00 00 |........|...."9..|
|00000080| 00 00 68 00 53 54 41 4b | ff ff ff ff 00 00 00 00 |..h.STAK|........|
|00000090| 00 00 00 0a 00 01 60 00 | 00 00 68 00 00 00 00 00 |......`.|..h.....|
|000000a0| 00 00 00 00 00 00 00 01 | 00 00 0a 17 00 00 00 06 |........|........|
|000000b0| 00 00 0b 8b 00 00 1c 61 | 00 00 00 02 00 00 09 40 |.......a|.......@|
|000000c0| 00 00 19 9f 00 00 00 00 | 00 05 00 00 10 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 02 10 80 00 02 10 80 00 | 02 10 80 00 02 10 80 00 |........|........|
|000000f0| dd 64 d6 43 00 00 00 00 | 00 00 00 00 01 e0 02 80 |.d.C....|........|
|00000100| 00 00 00 00 01 e0 02 80 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 0d 3b 00 00 0c fd | 01 e0 02 80 00 00 00 00 |...;....|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 80 00 00 00 08 00 00 00 |........|........|
|00000350| 88 00 22 00 88 00 22 00 | 88 88 22 22 88 88 22 22 |.."...".|..""..""|
|00000360| 88 aa 22 aa 88 aa 22 aa | cc aa 33 aa cc aa 33 aa |.."...".|..3...3.|
|00000370| ee aa bb aa ee aa bb aa | ee bb bb ee ee bb bb ee |........|........|
|00000380| ff bb ff ee ff bb ff ee | ff bb ff ff ff bb ff ff |........|........|
|00000390| 80 10 02 20 01 08 40 04 | ff ff ff ff ff ff ff ff |... ..@.|........|
|000003a0| 88 22 88 22 88 22 88 22 | 11 22 44 88 11 22 44 88 |."."."."|."D.."D.|
|000003b0| c4 80 0c 68 43 02 30 26 | b1 30 03 1b d8 c0 0c 8d |...hC.0&|.0......|
|000003c0| aa 00 aa 00 aa 00 aa 00 | 88 22 55 22 88 22 55 22 |........|."U"."U"|
|000003d0| 88 55 22 55 88 55 22 55 | 77 dd 77 dd 77 dd 77 dd |.U"U.U"U|w.w.w.w.|
|000003e0| 80 00 00 00 00 00 00 00 | aa 55 aa 55 aa 55 aa 55 |........|.U.U.U.U|
|000003f0| 03 84 48 30 0c 02 01 01 | 82 44 39 44 82 01 01 01 |..H0....|.D9D....|
|00000400| 88 14 22 41 88 41 22 14 | 80 80 41 3e 08 08 14 e3 |.."A.A".|..A>....|
|00000410| 22 04 8c 74 22 17 98 10 | be 80 88 08 eb 08 88 80 |"..t"...|........|
|00000420| 25 c8 32 89 64 24 4c 92 | a2 9c 41 be 2a c9 14 eb |%.2.d$L.|..A.*...|
|00000430| 40 a0 00 00 04 0a 00 00 | 80 40 20 00 02 04 08 00 |@.......|.@ .....|
|00000440| aa 00 80 00 88 00 80 00 | ff 80 80 80 80 80 80 80 |........|........|
|00000450| 08 1c 22 c1 80 01 02 04 | ff 80 80 80 ff 08 08 08 |..".....|........|
|00000460| f8 74 22 47 8f 17 22 71 | bf 00 bf bf b0 b0 b0 b0 |.t"G.."q|........|
|00000470| ff 7f be 5d a2 41 80 00 | fa f5 fa f5 a0 50 a0 50 |...].A..|.....P.P|
|00000480| 00 00 7f 00 00 00 02 20 | 00 01 58 c0 00 00 07 20 |....... |..X.... |
|00000490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000680| 2d 2d 20 74 68 69 73 20 | 73 63 72 69 70 74 20 63 |-- this |script c|
|00000690| 6f 6e 74 61 69 6e 73 3a | 0d 2d 2d 20 57 41 49 53 |ontains:|.-- WAIS|
|000006a0| 20 67 6c 6f 62 61 6c 73 | 20 61 6e 64 20 64 65 73 | globals| and des|
|000006b0| 63 72 69 70 74 69 6f 6e | 73 0d 2d 2d 20 57 41 49 |cription|s.-- WAI|
|000006c0| 53 20 58 46 43 4e 73 20 | 74 6f 20 61 63 63 65 73 |S XFCNs |to acces|
|000006d0| 73 20 74 68 65 20 77 61 | 69 73 2d 6c 69 73 74 65 |s the wa|is-liste|
|000006e0| 6e 65 72 0d 2d 2d 20 67 | 65 6e 65 72 61 6c 20 66 |ner.-- g|eneral f|
|000006f0| 75 6e 63 74 69 6f 6e 73 | 20 28 20 66 6f 72 20 70 |unctions| ( for p|
|00000700| 61 72 73 69 6e 67 20 29 | 0d 2d 2d 20 73 6f 6d 65 |arsing )|.-- some|
|00000710| 20 65 72 72 6f 72 20 68 | 61 6e 64 6c 69 6e 67 20 | error h|andling |
|00000720| 66 75 6e 63 74 69 6f 6e | 73 0d 2d 2d 20 6e 6f 74 |function|s.-- not|
|00000730| 65 20 74 68 61 74 20 74 | 68 65 20 66 75 6e 63 74 |e that t|he funct|
|00000740| 69 6f 6e 73 20 66 6f 72 | 20 70 61 72 73 69 6e 67 |ions for| parsing|
|00000750| 20 74 68 65 20 73 6f 75 | 72 63 65 20 66 69 6c 65 | the sou|rce file|
|00000760| 73 0d 2d 2d 20 68 61 76 | 65 20 62 65 65 6e 20 6d |s.-- hav|e been m|
|00000770| 6f 76 65 64 20 74 6f 20 | 74 68 65 20 62 61 63 6b |oved to |the back|
|00000780| 67 72 6f 75 6e 64 20 73 | 63 72 69 70 74 0d 0d 0d |ground s|cript...|
|00000790| 2d 2d 20 61 64 64 72 65 | 73 73 20 6f 66 20 74 68 |-- addre|ss of th|
|000007a0| 65 20 77 61 69 73 2d 6c | 69 73 74 65 6e 65 72 20 |e wais-l|istener |
|000007b0| 63 6f 6d 6d 73 20 73 74 | 72 75 63 74 75 72 65 20 |comms st|ructure |
|000007c0| 68 61 6e 64 6c 65 0d 67 | 6c 6f 62 61 6c 20 67 57 |handle.g|lobal gW|
|000007d0| 61 69 73 41 64 64 72 65 | 73 73 0d 0d 2d 2d 20 77 |aisAddre|ss..-- w|
|000007e0| 61 69 73 20 66 6f 6c 64 | 65 72 73 20 74 6f 20 73 |ais fold|ers to s|
|000007f0| 74 6f 72 65 20 73 6f 75 | 72 63 65 73 2c 20 64 6f |tore sou|rces, do|
|00000800| 63 75 6d 65 6e 74 73 20 | 61 6e 64 20 71 75 65 73 |cuments |and ques|
|00000810| 74 69 6f 6e 73 0d 67 6c | 6f 62 61 6c 20 57 61 69 |tions.gl|obal Wai|
|00000820| 73 53 6f 75 72 63 65 73 | 46 6f 6c 64 65 72 0d 67 |sSources|Folder.g|
|00000830| 6c 6f 62 61 6c 20 57 61 | 69 73 44 6f 63 75 6d 65 |lobal Wa|isDocume|
|00000840| 6e 74 73 46 6f 6c 64 65 | 72 0d 67 6c 6f 62 61 6c |ntsFolde|r.global|
|00000850| 20 57 61 69 73 51 75 65 | 73 74 69 6f 6e 73 46 6f | WaisQue|stionsFo|
|00000860| 6c 64 65 72 0d 0d 2d 2d | 20 64 6f 63 75 6d 65 6e |lder..--| documen|
|00000870| 74 20 68 65 61 64 6c 69 | 6e 65 20 69 6e 66 6f 72 |t headli|ne infor|
|00000880| 6d 61 74 69 6f 6e 20 67 | 6c 6f 62 61 6c 73 20 28 |mation g|lobals (|
|00000890| 20 70 65 72 20 64 6f 63 | 75 6d 65 6e 74 20 29 0d | per doc|ument ).|
|000008a0| 67 6c 6f 62 61 6c 20 64 | 6f 63 44 61 74 61 62 61 |global d|ocDataba|
|000008b0| 73 65 4e 61 6d 65 0d 67 | 6c 6f 62 61 6c 20 64 6f |seName.g|lobal do|
|000008c0| 63 53 69 74 65 4e 61 6d | 65 0d 67 6c 6f 62 61 6c |cSiteNam|e.global|
|000008d0| 20 64 6f 63 53 69 74 65 | 49 50 0d 67 6c 6f 62 61 | docSite|IP.globa|
|000008e0| 6c 20 64 6f 63 53 69 74 | 65 50 6f 72 74 0d 67 6c |l docSit|ePort.gl|
|000008f0| 6f 62 61 6c 20 64 6f 63 | 53 63 6f 72 65 0d 67 6c |obal doc|Score.gl|
|00000900| 6f 62 61 6c 20 64 6f 63 | 54 79 70 65 0d 67 6c 6f |obal doc|Type.glo|
|00000910| 62 61 6c 20 64 6f 63 4c | 69 6e 65 73 0d 67 6c 6f |bal docL|ines.glo|
|00000920| 62 61 6c 20 64 6f 63 4c | 65 6e 67 74 68 0d 67 6c |bal docL|ength.gl|
|00000930| 6f 62 61 6c 20 64 6f 63 | 42 65 73 74 4d 61 74 63 |obal doc|BestMatc|
|00000940| 68 0d 67 6c 6f 62 61 6c | 20 64 6f 63 49 44 0d 67 |h.global| docID.g|
|00000950| 6c 6f 62 61 6c 20 64 6f | 63 48 65 61 64 6c 69 6e |lobal do|cHeadlin|
|00000960| 65 0d 0d 2d 2d 20 64 6f | 63 75 6d 65 6e 74 20 68 |e..-- do|cument h|
|00000970| 65 61 64 6c 69 6e 65 20 | 72 61 6e 67 65 0d 67 6c |eadline |range.gl|
|00000980| 6f 62 61 6c 20 64 6f 63 | 48 65 61 64 6c 69 6e 65 |obal doc|Headline|
|00000990| 52 61 6e 67 65 0d 0d 2d | 2d 20 64 6f 63 75 6d 65 |Range..-|- docume|
|000009a0| 6e 74 20 63 6f 75 6e 74 | 20 67 6c 6f 62 61 6c 20 |nt count| global |
|000009b0| 28 20 66 6f 72 20 63 75 | 72 72 65 6e 74 20 71 75 |( for cu|rrent qu|
|000009c0| 65 72 79 20 29 0d 67 6c | 6f 62 61 6c 20 64 6f 63 |ery ).gl|obal doc|
|000009d0| 43 6f 75 6e 74 0d 0d 2d | 2d 20 63 75 72 72 65 6e |Count..-|- curren|
|000009e0| 74 20 64 6f 63 75 6d 65 | 6e 74 20 6e 75 6d 62 65 |t docume|nt numbe|
|000009f0| 72 20 67 6c 6f 62 61 6c | 0d 67 6c 6f 62 61 6c 20 |r global|.global |
|00000a00| 72 65 73 75 6c 74 44 6f | 63 4e 75 6d 0d 0d 2d 2d |resultDo|cNum..--|
|00000a10| 20 63 75 72 72 65 6e 74 | 20 64 6f 63 75 6d 65 6e | current| documen|
|00000a20| 74 20 74 65 78 74 20 68 | 61 6e 64 6c 65 20 61 6e |t text h|andle an|
|00000a30| 64 20 73 69 7a 65 20 28 | 20 69 66 20 64 6f 77 6e |d size (| if down|
|00000a40| 6c 6f 61 64 65 64 20 29 | 0d 67 6c 6f 62 61 6c 20 |loaded )|.global |
|00000a50| 64 6f 63 48 64 6c 0d 67 | 6c 6f 62 61 6c 20 64 6f |docHdl.g|lobal do|
|00000a60| 63 48 64 6c 53 69 7a 65 | 0d 0d 2d 2d 20 73 6f 75 |cHdlSize|..-- sou|
|00000a70| 72 63 65 20 67 6c 6f 62 | 61 6c 73 20 28 75 73 65 |rce glob|als (use|
|00000a80| 64 20 66 6f 72 20 72 65 | 61 64 69 6e 67 20 73 6f |d for re|ading so|
|00000a90| 75 72 63 65 20 66 69 6c | 65 73 29 0d 67 6c 6f 62 |urce fil|es).glob|
|00000aa0| 61 6c 20 73 69 74 65 4e | 61 6d 65 0d 67 6c 6f 62 |al siteN|ame.glob|
|00000ab0| 61 6c 20 73 69 74 65 49 | 50 0d 67 6c 6f 62 61 6c |al siteI|P.global|
|00000ac0| 20 73 69 74 65 50 6f 72 | 74 0d 67 6c 6f 62 61 6c | sitePor|t.global|
|00000ad0| 20 6d 61 69 6e 74 61 69 | 6e 65 72 0d 67 6c 6f 62 | maintai|ner.glob|
|00000ae0| 61 6c 20 64 61 74 61 62 | 61 73 65 4e 61 6d 65 0d |al datab|aseName.|
|00000af0| 67 6c 6f 62 61 6c 20 64 | 61 74 61 62 61 73 65 4d |global d|atabaseM|
|00000b00| 61 78 44 6f 63 4e 75 6d | 0d 67 6c 6f 62 61 6c 20 |axDocNum|.global |
|00000b10| 63 6f 6e 66 69 64 65 6e | 63 65 0d 67 6c 6f 62 61 |confiden|ce.globa|
|00000b20| 6c 20 64 65 73 63 72 69 | 70 74 69 6f 6e 0d 0d 2d |l descri|ption..-|
|00000b30| 2d 20 72 65 6c 65 76 61 | 6e 63 65 20 66 65 65 64 |- releva|nce feed|
|00000b40| 62 61 63 6b 20 65 6e 74 | 72 79 20 6e 75 6d 62 65 |back ent|ry numbe|
|00000b50| 72 0d 67 6c 6f 62 61 6c | 20 72 65 6c 45 6e 74 72 |r.global| relEntr|
|00000b60| 79 4e 75 6d 0d 0d 2d 2d | 20 64 69 61 67 73 54 65 |yNum..--| diagsTe|
|00000b70| 78 74 20 67 6c 6f 62 61 | 6c 0d 67 6c 6f 62 61 6c |xt globa|l.global|
|00000b80| 20 64 69 61 67 73 54 65 | 78 74 0d 0d 2d 2d 20 64 | diagsTe|xt..-- d|
|00000b90| 65 62 75 67 20 76 61 72 | 69 61 62 6c 65 20 2d 20 |ebug var|iable - |
|00000ba0| 77 68 65 6e 20 74 68 69 | 73 20 69 73 20 31 20 74 |when thi|s is 1 t|
|00000bb0| 68 65 6e 20 74 68 65 20 | 73 74 61 63 6b 20 70 75 |hen the |stack pu|
|00000bc0| 74 73 20 75 70 0d 2d 2d | 20 64 65 62 75 67 20 6d |ts up.--| debug m|
|00000bd0| 65 73 73 61 67 65 73 20 | 69 6e 20 74 68 65 20 6d |essages |in the m|
|00000be0| 65 73 73 61 67 65 20 77 | 69 6e 64 6f 69 64 0d 67 |essage w|indoid.g|
|00000bf0| 6c 6f 62 61 6c 20 44 45 | 42 55 47 0d 0d 2d 2d 20 |lobal DE|BUG..-- |
|00000c00| 6f 70 65 6e 20 73 6f 75 | 72 63 65 73 0d 67 6c 6f |open sou|rces.glo|
|00000c10| 62 61 6c 20 6f 70 65 6e | 53 6f 75 72 63 65 73 0d |bal open|Sources.|
|00000c20| 0d 0d 6f 6e 20 6f 70 65 | 6e 53 74 61 63 6b 0d 0d |..on ope|nStack..|
|00000c30| 0d 2d 2d 20 63 68 65 63 | 6b 20 74 68 65 20 76 65 |.-- chec|k the ve|
|00000c40| 72 73 69 6f 6e 20 6f 66 | 20 74 68 65 20 4f 53 0d |rsion of| the OS.|
|00000c50| 2d 2d 20 74 68 69 73 20 | 66 61 69 6c 73 20 69 6e |-- this |fails in|
|00000c60| 20 61 6e 79 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 | any ver|sion of |
|00000c70| 48 43 20 32 2e 31 20 6f | 72 20 6c 65 73 73 0d 69 |HC 2.1 o|r less.i|
|00000c80| 66 20 74 68 65 20 73 79 | 73 74 65 6d 56 65 72 73 |f the sy|stemVers|
|00000c90| 69 6f 6e 20 3c 20 37 2e | 30 20 74 68 65 6e 0d 61 |ion < 7.|0 then.a|
|00000ca0| 6e 73 77 65 72 20 22 59 | 6f 75 20 6e 65 65 64 20 |nswer "Y|ou need |
|00000cb0| 53 79 73 74 65 6d 20 37 | 2e 30 20 74 6f 20 72 75 |System 7|.0 to ru|
|00000cc0| 6e 20 74 68 69 73 20 73 | 74 61 63 6b 22 20 77 69 |n this s|tack" wi|
|00000cd0| 74 68 20 22 4f 4b 22 0d | 65 6e 64 20 69 66 0d 0d |th "OK".|end if..|
|00000ce0| 2d 2d 20 63 68 65 63 6b | 20 74 68 65 20 76 65 72 |-- check| the ver|
|00000cf0| 73 69 6f 6e 20 6f 66 20 | 48 79 70 65 72 63 61 72 |sion of |Hypercar|
|00000d00| 64 0d 69 66 20 74 68 65 | 20 76 65 72 73 69 6f 6e |d.if the| version|
|00000d10| 20 3c 20 32 2e 31 20 74 | 68 65 6e 0d 61 6e 73 77 | < 2.1 t|hen.answ|
|00000d20| 65 72 20 22 59 6f 75 20 | 6e 65 65 64 20 48 79 70 |er "You |need Hyp|
|00000d30| 65 72 63 61 72 64 20 32 | 2e 31 20 74 6f 20 72 75 |ercard 2|.1 to ru|
|00000d40| 6e 20 74 68 69 73 20 73 | 74 61 63 6b 22 20 77 69 |n this s|tack" wi|
|00000d50| 74 68 20 22 4f 4b 22 0d | 65 6e 64 20 69 66 0d 0d |th "OK".|end if..|
|00000d60| 2d 2d 20 63 68 65 63 6b | 20 74 68 65 20 61 6d 6f |-- check| the amo|
|00000d70| 75 6e 74 20 6f 66 20 68 | 65 61 70 20 73 70 61 63 |unt of h|eap spac|
|00000d80| 65 20 77 65 20 68 61 76 | 65 0d 2d 2d 20 77 65 20 |e we hav|e.-- we |
|00000d90| 6e 65 65 64 20 34 30 30 | 4b 20 6f 66 20 68 65 61 |need 400|K of hea|
|00000da0| 70 20 73 70 61 63 65 20 | 74 6f 20 72 75 6e 20 70 |p space |to run p|
|00000db0| 72 6f 70 65 72 6c 79 0d | 69 66 20 74 68 65 20 68 |roperly.|if the h|
|00000dc0| 65 61 70 53 70 61 63 65 | 20 3c 20 34 30 30 30 30 |eapSpace| < 40000|
|00000dd0| 30 20 74 68 65 6e 0d 61 | 6e 73 77 65 72 20 22 54 |0 then.a|nswer "T|
|00000de0| 68 65 72 65 20 70 72 6f | 62 61 62 6c 79 20 69 73 |here pro|bably is|
|00000df0| 20 6e 6f 74 20 65 6e 6f | 75 67 68 20 6d 65 6d 6f | not eno|ugh memo|
|00000e00| 72 79 20 74 6f 20 72 75 | 6e 20 48 79 70 65 72 57 |ry to ru|n HyperW|
|00000e10| 61 69 73 22 26 c2 0d 22 | 20 72 65 6c 69 61 62 6c |ais"&.."| reliabl|
|00000e20| 79 2c 20 70 6c 65 61 73 | 65 20 61 6c 6c 6f 63 61 |y, pleas|e alloca|
|00000e30| 74 65 20 6d 6f 72 65 20 | 6d 65 6d 6f 72 79 20 74 |te more |memory t|
|00000e40| 6f 20 48 79 70 65 72 63 | 61 72 64 22 20 77 69 74 |o Hyperc|ard" wit|
|00000e50| 68 20 22 4f 4b 22 0d 65 | 6e 64 20 69 66 0d 0d 70 |h "OK".e|nd if..p|
|00000e60| 75 74 20 63 68 65 63 6b | 46 6f 6c 64 65 72 73 28 |ut check|Folders(|
|00000e70| 29 20 69 6e 74 6f 20 77 | 61 69 73 45 72 72 6f 72 |) into w|aisError|
|00000e80| 0d 0d 0d 2d 2d 20 64 65 | 62 75 67 20 76 61 72 69 |...-- de|bug vari|
|00000e90| 61 62 6c 65 20 2d 20 73 | 65 74 20 74 6f 20 64 65 |able - s|et to de|
|00000ea0| 62 75 67 0d 67 6c 6f 62 | 61 6c 20 44 45 42 55 47 |bug.glob|al DEBUG|
|00000eb0| 0d 70 75 74 20 30 20 69 | 6e 74 6f 20 44 45 42 55 |.put 0 i|nto DEBU|
|00000ec0| 47 0d 0d 0d 2d 2d 20 63 | 6c 65 61 72 20 6f 75 74 |G...-- c|lear out|
|00000ed0| 20 6c 69 73 74 20 6f 66 | 20 63 75 72 72 65 6e 74 | list of| current|
|00000ee0| 6c 79 20 6f 70 65 6e 65 | 64 20 73 6f 75 72 63 65 |ly opene|d source|
|00000ef0| 73 0d 67 6c 6f 62 61 6c | 20 6f 70 65 6e 53 6f 75 |s.global| openSou|
|00000f00| 72 63 65 73 0d 70 75 74 | 20 65 6d 70 74 79 20 69 |rces.put| empty i|
|00000f10| 6e 74 6f 20 6f 70 65 6e | 53 6f 75 72 63 65 73 0d |nto open|Sources.|
|00000f20| 0d 2d 2d 20 63 6c 65 61 | 72 20 6f 75 74 20 73 6f |.-- clea|r out so|
|00000f30| 6d 65 20 63 61 72 64 20 | 66 69 65 6c 64 73 0d 70 |me card |fields.p|
|00000f40| 75 74 20 65 6d 70 74 79 | 20 69 6e 74 6f 20 62 61 |ut empty| into ba|
|00000f50| 63 6b 67 72 6f 75 6e 64 | 20 66 69 65 6c 64 20 22 |ckground| field "|
|00000f60| 73 74 61 74 75 73 5f 6c | 69 6e 65 22 0d 70 75 74 |status_l|ine".put|
|00000f70| 20 65 6d 70 74 79 20 69 | 6e 74 6f 20 63 61 72 64 | empty i|nto card|
|00000f80| 20 66 69 65 6c 64 20 22 | 71 75 65 72 79 22 20 6f | field "|query" o|
|00000f90| 66 20 63 61 72 64 20 22 | 71 75 65 72 79 22 0d 70 |f card "|query".p|
|00000fa0| 75 74 20 65 6d 70 74 79 | 20 69 6e 74 6f 20 63 61 |ut empty| into ca|
|00000fb0| 72 64 20 66 69 65 6c 64 | 20 22 66 65 65 64 62 61 |rd field| "feedba|
|00000fc0| 63 6b 22 20 6f 66 20 63 | 61 72 64 20 22 71 75 65 |ck" of c|ard "que|
|00000fd0| 72 79 22 0d 70 75 74 20 | 65 6d 70 74 79 20 69 6e |ry".put |empty in|
|00000fe0| 74 6f 20 63 61 72 64 20 | 66 69 65 6c 64 20 22 72 |to card |field "r|
|00000ff0| 65 73 75 6c 74 73 22 20 | 6f 66 20 63 61 72 64 20 |esults" |of card |
|00001000| 22 71 75 65 72 79 22 0d | 70 75 74 20 65 6d 70 74 |"query".|put empt|
|00001010| 79 20 69 6e 74 6f 20 63 | 61 72 64 20 66 69 65 6c |y into c|ard fiel|
|00001020| 64 20 22 64 6f 63 75 6d | 65 6e 74 22 20 6f 66 20 |d "docum|ent" of |
|00001030| 63 61 72 64 20 22 64 6f | 63 75 6d 65 6e 74 22 0d |card "do|cument".|
|00001040| 70 75 74 20 65 6d 70 74 | 79 20 69 6e 74 6f 20 63 |put empt|y into c|
|00001050| 61 72 64 20 66 69 65 6c | 64 20 22 73 74 61 72 74 |ard fiel|d "start|
|00001060| 5f 6c 69 6e 65 5f 63 6f | 75 6e 74 22 20 6f 66 20 |_line_co|unt" of |
|00001070| 63 61 72 64 20 22 64 6f | 63 75 6d 65 6e 74 22 0d |card "do|cument".|
|00001080| 70 75 74 20 65 6d 70 74 | 79 20 69 6e 74 6f 20 63 |put empt|y into c|
|00001090| 61 72 64 20 66 69 65 6c | 64 20 22 65 6e 64 5f 6c |ard fiel|d "end_l|
|000010a0| 69 6e 65 5f 63 6f 75 6e | 74 22 20 6f 66 20 63 61 |ine_coun|t" of ca|
|000010b0| 72 64 20 22 64 6f 63 75 | 6d 65 6e 74 22 0d 70 75 |rd "docu|ment".pu|
|000010c0| 74 20 65 6d 70 74 79 20 | 69 6e 74 6f 20 63 61 72 |t empty |into car|
|000010d0| 64 20 66 69 65 6c 64 20 | 22 74 6f 74 61 6c 5f 6c |d field |"total_l|
|000010e0| 69 6e 65 5f 63 6f 75 6e | 74 22 20 6f 66 20 63 61 |ine_coun|t" of ca|
|000010f0| 72 64 20 22 64 6f 63 75 | 6d 65 6e 74 22 0d 73 65 |rd "docu|ment".se|
|00001100| 6e 64 20 6d 6f 75 73 65 | 55 70 20 74 6f 20 62 75 |nd mouse|Up to bu|
|00001110| 74 74 6f 6e 20 22 4e 65 | 77 20 53 6f 75 72 63 65 |tton "Ne|w Source|
|00001120| 22 20 6f 66 20 63 61 72 | 64 20 22 65 64 69 74 5f |" of car|d "edit_|
|00001130| 73 6f 75 72 63 65 73 22 | 0d 0d 2d 2d 20 63 6f 6e |sources"|..-- con|
|00001140| 6e 65 63 74 20 75 70 20 | 61 6e 64 20 72 65 73 65 |nect up |and rese|
|00001150| 74 0d 69 66 20 20 4f 70 | 65 6e 53 65 73 73 69 6f |t.if Op|enSessio|
|00001160| 6e 28 29 20 3d 20 30 20 | 74 68 65 6e 0d 69 66 20 |n() = 0 |then.if |
|00001170| 57 61 69 73 52 65 73 65 | 74 53 65 73 73 69 6f 6e |WaisRese|tSession|
|00001180| 28 29 20 ad 20 30 20 74 | 68 65 6e 0d 61 6e 73 77 |() . 0 t|hen.answ|
|00001190| 65 72 20 22 43 6f 75 6c | 64 20 6e 6f 74 20 72 65 |er "Coul|d not re|
|000011a0| 73 65 74 20 74 68 65 20 | 77 61 69 73 2d 6c 69 73 |set the |wais-lis|
|000011b0| 74 65 6e 65 72 22 20 77 | 69 74 68 20 22 4f 4b 22 |tener" w|ith "OK"|
|000011c0| 0d 65 6e 64 20 69 66 0d | 65 6c 73 65 0d 61 6e 73 |.end if.|else.ans|
|000011d0| 77 65 72 20 22 43 6f 75 | 6c 64 20 6e 6f 74 20 6f |wer "Cou|ld not o|
|000011e0| 70 65 6e 20 61 20 73 65 | 73 73 69 6f 6e 20 74 6f |pen a se|ssion to|
|000011f0| 20 74 68 65 20 77 61 69 | 73 2d 6c 69 73 74 65 6e | the wai|s-listen|
|00001200| 65 72 22 20 77 69 74 68 | 20 22 4f 4b 22 0d 65 6e |er" with| "OK".en|
|00001210| 64 20 69 66 0d 0d 65 6e | 64 20 6f 70 65 6e 53 74 |d if..en|d openSt|
|00001220| 61 63 6b 0d 0d 0d 6f 6e | 20 63 6c 6f 73 65 53 74 |ack...on| closeSt|
|00001230| 61 63 6b 0d 2d 2d 20 69 | 66 20 74 68 65 20 6c 69 |ack.-- i|f the li|
|00001240| 73 74 65 6e 65 72 20 69 | 73 20 6f 70 65 6e 2c 20 |stener i|s open, |
|00001250| 72 65 73 65 74 20 69 74 | 20 61 6e 64 20 63 6c 6f |reset it| and clo|
|00001260| 73 65 20 74 68 65 20 63 | 6f 6e 6e 65 63 74 69 6f |se the c|onnectio|
|00001270| 6e 0d 0d 2d 2d 20 72 65 | 73 65 74 20 61 6e 64 20 |n..-- re|set and |
|00001280| 63 6c 6f 73 65 20 74 68 | 65 20 73 65 73 73 69 6f |close th|e sessio|
|00001290| 6e 20 66 72 6f 6d 20 74 | 68 65 20 77 61 69 73 2d |n from t|he wais-|
|000012a0| 6c 69 73 74 65 6e 65 72 | 0d 69 66 20 63 6f 6e 6e |listener|.if conn|
|000012b0| 65 63 74 65 64 28 29 20 | 3d 20 31 20 74 68 65 6e |ected() |= 1 then|
|000012c0| 0d 0d 69 66 20 20 57 61 | 69 73 52 65 73 65 74 53 |..if Wa|isResetS|
|000012d0| 65 73 73 69 6f 6e 28 29 | 20 3d 20 30 20 74 68 65 |ession()| = 0 the|
|000012e0| 6e 0d 69 66 20 43 6c 6f | 73 65 53 65 73 73 69 6f |n.if Clo|seSessio|
|000012f0| 6e 28 29 20 ad 20 30 20 | 74 68 65 6e 0d 61 6e 73 |n() . 0 |then.ans|
|00001300| 77 65 72 20 22 43 6f 75 | 6c 64 20 6e 6f 74 20 63 |wer "Cou|ld not c|
|00001310| 6c 6f 73 65 20 74 68 65 | 20 73 65 73 73 69 6f 6e |lose the| session|
|00001320| 20 74 6f 20 74 68 65 20 | 77 61 69 73 2d 6c 69 73 | to the |wais-lis|
|00001330| 74 65 6e 65 72 22 20 77 | 69 74 68 20 22 4f 4b 22 |tener" w|ith "OK"|
|00001340| 0d 65 6e 64 20 69 66 0d | 65 6c 73 65 0d 61 6e 73 |.end if.|else.ans|
|00001350| 77 65 72 20 22 43 6f 75 | 6c 64 20 6e 6f 74 20 72 |wer "Cou|ld not r|
|00001360| 65 73 65 74 20 74 68 65 | 20 77 61 69 73 2d 6c 69 |eset the| wais-li|
|00001370| 73 74 65 6e 65 72 22 20 | 77 69 74 68 20 22 4f 4b |stener" |with "OK|
|00001380| 22 0d 65 6e 64 20 69 66 | 0d 0d 65 6e 64 20 69 66 |".end if|..end if|
|00001390| 0d 0d 65 6e 64 20 63 6c | 6f 73 65 53 74 61 63 6b |..end cl|oseStack|
|000013a0| 0d 0d 0d 66 75 6e 63 74 | 69 6f 6e 20 4f 70 65 6e |...funct|ion Open|
|000013b0| 53 65 73 73 69 6f 6e 0d | 2d 2d 20 6f 70 65 6e 73 |Session.|-- opens|
|000013c0| 20 61 20 73 65 73 73 6f | 6e 20 74 6f 20 74 68 65 | a sesso|n to the|
|000013d0| 20 77 61 69 73 2d 6c 69 | 73 74 65 6e 65 72 2c 20 | wais-li|stener, |
|000013e0| 74 68 69 73 20 73 65 74 | 73 20 74 68 65 20 67 6c |this set|s the gl|
|000013f0| 6f 62 61 6c 0d 2d 2d 20 | 67 57 61 69 73 41 64 64 |obal.-- |gWaisAdd|
|00001400| 72 65 73 73 20 77 68 69 | 63 68 20 69 73 20 74 68 |ress whi|ch is th|
|00001410| 65 20 68 61 6e 64 6c 65 | 20 74 6f 20 74 68 65 20 |e handle| to the |
|00001420| 61 70 70 6c 65 20 65 76 | 65 6e 74 73 20 61 64 64 |apple ev|ents add|
|00001430| 72 65 73 73 0d 2d 2d 20 | 73 74 72 75 63 74 75 72 |ress.-- |structur|
|00001440| 65 20 77 68 69 63 68 20 | 61 6c 6c 6f 77 73 20 75 |e which |allows u|
|00001450| 73 20 74 6f 20 63 6f 6d | 6d 75 6e 69 63 61 74 65 |s to com|municate|
|00001460| 20 77 69 74 68 20 74 68 | 65 20 77 61 69 73 2d 6c | with th|e wais-l|
|00001470| 69 73 74 65 6e 65 72 0d | 2d 2d 20 72 65 74 75 72 |istener.|-- retur|
|00001480| 6e 20 65 72 72 6f 72 20 | 6e 75 6d 62 65 72 20 28 |n error |number (|
|00001490| 20 30 20 2d 20 6e 6f 20 | 65 72 72 6f 72 20 29 0d | 0 - no |error ).|
|000014a0| 0d 67 6c 6f 62 61 6c 20 | 67 57 61 69 73 41 64 64 |.global |gWaisAdd|
|000014b0| 72 65 73 73 0d 67 6c 6f | 62 61 6c 20 44 45 42 55 |ress.glo|bal DEBU|
|000014c0| 47 0d 0d 70 75 74 20 30 | 20 69 6e 74 6f 20 77 61 |G..put 0| into wa|
|000014d0| 69 73 45 72 72 6f 72 0d | 0d 2d 2d 20 63 6f 6e 6e |isError.|.-- conn|
|000014e0| 65 63 74 20 75 70 20 74 | 6f 20 74 68 65 20 77 61 |ect up t|o the wa|
|000014f0| 69 73 2d 6c 69 73 74 65 | 6e 65 72 0d 69 66 20 64 |is-liste|ner.if d|
|00001500| 69 73 63 6f 6e 6e 65 63 | 74 65 64 28 29 20 3d 20 |isconnec|ted() = |
|00001510| 31 20 74 68 65 6e 0d 70 | 75 74 20 22 4f 70 65 6e |1 then.p|ut "Open|
|00001520| 69 6e 67 20 73 65 73 73 | 69 6f 6e 20 74 6f 20 77 |ing sess|ion to w|
|00001530| 61 69 73 20 6c 69 73 74 | 65 6e 65 72 22 20 69 6e |ais list|ener" in|
|00001540| 74 6f 20 62 61 63 6b 67 | 72 6f 75 6e 64 20 66 69 |to backg|round fi|
|00001550| 65 6c 64 20 22 73 74 61 | 74 75 73 5f 6c 69 6e 65 |eld "sta|tus_line|
|00001560| 22 0d 0d 70 75 74 20 48 | 43 4f 70 65 6e 53 65 73 |"..put H|COpenSes|
|00001570| 73 69 6f 6e 28 29 20 69 | 6e 74 6f 20 77 61 69 73 |sion() i|nto wais|
|00001580| 45 72 72 6f 72 0d 0d 69 | 66 20 44 45 42 55 47 20 |Error..i|f DEBUG |
|00001590| 3d 20 31 20 74 68 65 6e | 0d 70 75 74 20 22 4f 70 |= 1 then|.put "Op|
|000015a0| 65 6e 53 65 73 73 69 6f | 6e 20 28 22 26 67 57 61 |enSessio|n ("&gWa|
|000015b0| 69 73 41 64 64 72 65 73 | 73 26 22 29 20 5b 22 26 |isAddres|s&") ["&|
|000015c0| 77 61 69 73 45 72 72 6f | 72 26 22 5d 22 20 c2 0d |waisErro|r&"]" ..|
|000015d0| 69 6e 74 6f 20 6d 65 73 | 73 61 67 65 20 62 6f 78 |into mes|sage box|
|000015e0| 0d 65 6e 64 20 69 66 0d | 0d 70 75 74 20 68 61 6e |.end if.|.put han|
|000015f0| 64 6c 65 57 61 69 73 45 | 72 72 6f 72 28 77 61 69 |dleWaisE|rror(wai|
|00001600| 73 45 72 72 6f 72 29 20 | 69 6e 74 6f 20 77 61 69 |sError) |into wai|
|00001610| 73 45 72 72 6f 72 0d 0d | 70 75 74 20 65 6d 70 74 |sError..|put empt|
|00001620| 79 20 69 6e 74 6f 20 62 | 61 63 6b 67 72 6f 75 6e |y into b|ackgroun|
|00001630| 64 20 66 69 65 6c 64 20 | 22 73 74 61 74 75 73 5f |d field |"status_|
|00001640| 6c 69 6e 65 22 0d 0d 65 | 6e 64 20 69 66 0d 0d 72 |line"..e|nd if..r|
|00001650| 65 74 75 72 6e 20 77 61 | 69 73 45 72 72 6f 72 0d |eturn wa|isError.|
|00001660| 0d 65 6e 64 20 4f 70 65 | 6e 53 65 73 73 69 6f 6e |.end Ope|nSession|
|00001670| 0d 0d 0d 66 75 6e 63 74 | 69 6f 6e 20 43 6c 6f 73 |...funct|ion Clos|
|00001680| 65 53 65 73 73 69 6f 6e | 0d 2d 2d 20 63 6c 6f 73 |eSession|.-- clos|
|00001690| 65 73 20 61 20 73 65 73 | 73 69 6f 6e 20 74 6f 20 |es a ses|sion to |
|000016a0| 74 68 65 20 77 61 69 73 | 2d 6c 69 73 74 65 6e 65 |the wais|-listene|
|000016b0| 72 0d 2d 2d 20 72 65 74 | 75 72 6e 20 65 72 72 6f |r.-- ret|urn erro|
|000016c0| 72 20 6e 75 6d 62 65 72 | 20 28 20 30 20 2d 20 6e |r number| ( 0 - n|
|000016d0| 6f 20 65 72 72 6f 72 20 | 29 0d 0d 67 6c 6f 62 61 |o error |)..globa|
|000016e0| 6c 20 67 57 61 69 73 41 | 64 64 72 65 73 73 0d 67 |l gWaisA|ddress.g|
|000016f0| 6c 6f 62 61 6c 20 44 45 | 42 55 47 0d 0d 70 75 74 |lobal DE|BUG..put|
|00001700| 20 30 20 69 6e 74 6f 20 | 77 61 69 73 45 72 72 6f | 0 into |waisErro|
|00001710| 72 0d 0d 2d 2d 20 64 69 | 73 63 6f 6e 6e 65 63 74 |r..-- di|sconnect|
|00001720| 20 66 72 6f 6d 20 74 68 | 65 20 77 61 69 73 2d 6c | from th|e wais-l|
|00001730| 69 73 74 65 6e 65 72 0d | 69 66 20 63 6f 6e 6e 65 |istener.|if conne|
|00001740| 63 74 65 64 28 29 20 3d | 20 31 20 74 68 65 6e 0d |cted() =| 1 then.|
|00001750| 70 75 74 20 22 43 6c 6f | 73 69 6e 67 20 73 65 73 |put "Clo|sing ses|
|00001760| 73 69 6f 6e 20 74 6f 20 | 77 61 69 73 20 6c 69 73 |sion to |wais lis|
|00001770| 74 65 6e 65 72 22 20 69 | 6e 74 6f 20 62 61 63 6b |tener" i|nto back|
|00001780| 67 72 6f 75 6e 64 20 66 | 69 65 6c 64 20 22 73 74 |ground f|ield "st|
|00001790| 61 74 75 73 5f 6c 69 6e | 65 22 0d 0d 70 75 74 20 |atus_lin|e"..put |
|000017a0| 48 43 43 6c 6f 73 65 53 | 65 73 73 69 6f 6e 28 67 |HCCloseS|ession(g|
|000017b0| 57 61 69 73 41 64 64 72 | 65 73 73 29 20 69 6e 74 |WaisAddr|ess) int|
|000017c0| 6f 20 77 61 69 73 45 72 | 72 6f 72 0d 0d 69 66 20 |o waisEr|ror..if |
|000017d0| 44 45 42 55 47 20 3d 20 | 31 20 74 68 65 6e 0d 70 |DEBUG = |1 then.p|
|000017e0| 75 74 20 22 43 6c 6f 73 | 65 53 65 73 73 69 6f 6e |ut "Clos|eSession|
|000017f0| 20 28 22 26 67 57 61 69 | 73 41 64 64 72 65 73 73 | ("&gWai|sAddress|
|00001800| 26 22 29 20 5b 22 26 77 | 61 69 73 45 72 72 6f 72 |&") ["&w|aisError|
|00001810| 26 22 5d 22 20 c2 0d 69 | 6e 74 6f 20 6d 65 73 73 |&"]" ..i|nto mess|
|00001820| 61 67 65 20 62 6f 78 0d | 65 6e 64 20 69 66 0d 0d |age box.|end if..|
|00001830| 70 75 74 20 68 61 6e 64 | 6c 65 57 61 69 73 45 72 |put hand|leWaisEr|
|00001840| 72 6f 72 28 77 61 69 73 | 45 72 72 6f 72 29 20 69 |ror(wais|Error) i|
|00001850| 6e 74 6f 20 77 61 69 73 | 45 72 72 6f 72 0d 0d 70 |nto wais|Error..p|
|00001860| 75 74 20 65 6d 70 74 79 | 20 69 6e 74 6f 20 62 61 |ut empty| into ba|
|00001870| 63 6b 67 72 6f 75 6e 64 | 20 66 69 65 6c 64 20 22 |ckground| field "|
|00001880| 73 74 61 74 75 73 5f 6c | 69 6e 65 22 0d 0d 65 6e |status_l|ine"..en|
|00001890| 64 20 69 66 0d 0d 72 65 | 74 75 72 6e 20 77 61 69 |d if..re|turn wai|
|000018a0| 73 45 72 72 6f 72 0d 0d | 65 6e 64 20 43 6c 6f 73 |sError..|end Clos|
|000018b0| 65 53 65 73 73 69 6f 6e | 0d 0d 0d 66 75 6e 63 74 |eSession|...funct|
|000018c0| 69 6f 6e 20 4f 70 65 6e | 57 61 69 73 53 6f 75 72 |ion Open|WaisSour|
|000018d0| 63 65 20 64 61 74 61 62 | 61 73 65 4e 61 6d 65 2c |ce datab|aseName,|
|000018e0| 20 64 61 74 61 62 61 73 | 65 4d 61 78 44 6f 63 4e | databas|eMaxDocN|
|000018f0| 75 6d 2c 20 c2 0d 73 69 | 74 65 4e 61 6d 65 2c 20 |um, ..si|teName, |
|00001900| 73 69 74 65 49 50 2c 20 | 73 69 74 65 50 6f 72 74 |siteIP, |sitePort|
|00001910| 0d 2d 2d 20 74 68 69 73 | 20 6f 70 65 6e 73 20 61 |.-- this| opens a|
|00001920| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 20 74 6f 20 61 | connect|ion to a|
|00001930| 20 77 61 69 73 20 73 6f | 75 72 63 65 2c 20 61 6c | wais so|urce, al|
|00001940| 6c 20 74 68 65 20 70 61 | 72 61 6d 65 74 65 72 73 |l the pa|rameters|
|00001950| 0d 2d 2d 20 61 72 65 20 | 6d 61 6e 64 61 74 6f 72 |.-- are |mandator|
|00001960| 79 0d 2d 2d 20 72 65 74 | 75 72 6e 20 65 72 72 6f |y.-- ret|urn erro|
|00001970| 72 20 6e 75 6d 62 65 72 | 20 28 20 30 20 2d 20 6e |r number| ( 0 - n|
|00001980| 6f 20 65 72 72 6f 72 20 | 29 0d 0d 67 6c 6f 62 61 |o error |)..globa|
|00001990| 6c 20 67 57 61 69 73 41 | 64 64 72 65 73 73 0d 67 |l gWaisA|ddress.g|
|000019a0| 6c 6f 62 61 6c 20 44 45 | 42 55 47 0d 0d 70 75 74 |lobal DE|BUG..put|
|000019b0| 20 30 20 69 6e 74 6f 20 | 77 61 69 73 45 72 72 6f | 0 into |waisErro|
|000019c0| 72 0d 0d 2d 2d 20 6f 70 | 65 6e 20 61 20 77 61 69 |r..-- op|en a wai|
|000019d0| 73 20 73 6f 75 72 63 65 | 0d 69 66 20 63 6f 6e 6e |s source|.if conn|
|000019e0| 65 63 74 65 64 28 29 20 | 3d 20 31 20 74 68 65 6e |ected() |= 1 then|
|000019f0| 0d 70 75 74 20 22 4f 70 | 65 6e 69 6e 67 20 57 61 |.put "Op|ening Wa|
|00001a00| 69 73 20 73 6f 75 72 63 | 65 3a 20 22 26 64 61 74 |is sourc|e: "&dat|
|00001a10| 61 62 61 73 65 4e 61 6d | 65 20 69 6e 74 6f 20 62 |abaseNam|e into b|
|00001a20| 61 63 6b 67 72 6f 75 6e | 64 20 66 69 65 6c 64 20 |ackgroun|d field |
|00001a30| 22 73 74 61 74 75 73 5f | 6c 69 6e 65 22 0d 0d 70 |"status_|line"..p|
|00001a40| 75 74 20 48 43 4f 70 65 | 6e 57 61 69 73 53 6f 75 |ut HCOpe|nWaisSou|
|00001a50| 72 63 65 28 67 57 61 69 | 73 41 64 64 72 65 73 73 |rce(gWai|sAddress|
|00001a60| 2c 20 64 61 74 61 62 61 | 73 65 4e 61 6d 65 2c 20 |, databa|seName, |
|00001a70| c2 0d 64 61 74 61 62 61 | 73 65 4d 61 78 44 6f 63 |..databa|seMaxDoc|
|00001a80| 4e 75 6d 2c 20 73 69 74 | 65 4e 61 6d 65 2c 20 73 |Num, sit|eName, s|
|00001a90| 69 74 65 49 50 2c 20 73 | 69 74 65 50 6f 72 74 29 |iteIP, s|itePort)|
|00001aa0| 20 69 6e 74 6f 20 77 61 | 69 73 45 72 72 6f 72 0d | into wa|isError.|
|00001ab0| 0d 69 66 20 44 45 42 55 | 47 20 3d 20 31 20 74 68 |.if DEBU|G = 1 th|
|00001ac0| 65 6e 0d 70 75 74 20 22 | 4f 70 65 6e 57 61 69 73 |en.put "|OpenWais|
|00001ad0| 53 6f 75 72 63 65 20 28 | 22 26 64 61 74 61 62 61 |Source (|"&databa|
|00001ae0| 73 65 4e 61 6d 65 26 22 | 2c 22 26 64 61 74 61 62 |seName&"|,"&datab|
|00001af0| 61 73 65 4d 61 78 44 6f | 63 4e 75 6d 26 22 2c 22 |aseMaxDo|cNum&","|
|00001b00| 26 c2 0d 73 69 74 65 4e | 61 6d 65 26 22 2c 22 26 |&..siteN|ame&","&|
|00001b10| 73 69 74 65 49 50 26 22 | 2c 22 26 73 69 74 65 50 |siteIP&"|,"&siteP|
|00001b20| 6f 72 74 26 22 29 20 5b | 22 26 77 61 69 73 45 72 |ort&") [|"&waisEr|
|00001b30| 72 6f 72 26 22 5d 22 20 | 69 6e 74 6f 20 6d 65 73 |ror&"]" |into mes|
|00001b40| 73 61 67 65 20 62 6f 78 | 0d 65 6e 64 20 69 66 0d |sage box|.end if.|
|00001b50| 0d 70 75 74 20 68 61 6e | 64 6c 65 57 61 69 73 45 |.put han|dleWaisE|
|00001b60| 72 72 6f 72 28 77 61 69 | 73 45 72 72 6f 72 29 20 |rror(wai|sError) |
|00001b70| 69 6e 74 6f 20 77 61 69 | 73 45 72 72 6f 72 0d 0d |into wai|sError..|
|00001b80| 70 75 74 20 65 6d 70 74 | 79 20 69 6e 74 6f 20 62 |put empt|y into b|
|00001b90| 61 63 6b 67 72 6f 75 6e | 64 20 66 69 65 6c 64 20 |ackgroun|d field |
|00001ba0| 22 73 74 61 74 75 73 5f | 6c 69 6e 65 22 0d 0d 65 |"status_|line"..e|
|00001bb0| 6e 64 20 69 66 0d 0d 72 | 65 74 75 72 6e 20 77 61 |nd if..r|eturn wa|
|00001bc0| 69 73 45 72 72 6f 72 0d | 0d 65 6e 64 20 4f 70 65 |isError.|.end Ope|
|00001bd0| 6e 57 61 69 73 53 6f 75 | 72 63 65 0d 0d 0d 66 75 |nWaisSou|rce...fu|
|00001be0| 6e 63 74 69 6f 6e 20 43 | 6c 6f 73 65 57 61 69 73 |nction C|loseWais|
|00001bf0| 53 6f 75 72 63 65 20 20 | 64 61 74 61 62 61 73 65 |Source |database|
|00001c00| 4e 61 6d 65 2c 20 73 69 | 74 65 4e 61 6d 65 2c 20 |Name, si|teName, |
|00001c10| 73 69 74 65 50 6f 72 74 | 0d 2d 2d 20 63 6c 6f 73 |sitePort|.-- clos|
|00001c20| 65 73 20 61 20 63 6f 6e | 6e 65 63 74 69 6f 6e 20 |es a con|nection |
|00001c30| 74 6f 20 61 20 77 61 69 | 73 20 73 6f 75 72 63 65 |to a wai|s source|
|00001c40| 0d 2d 2d 20 72 65 74 75 | 72 6e 20 65 72 72 6f 72 |.-- retu|rn error|
|00001c50| 20 6e 75 6d 62 65 72 20 | 28 20 30 20 2d 20 6e 6f | number |( 0 - no|
|00001c60| 20 65 72 72 6f 72 20 29 | 0d 0d 67 6c 6f 62 61 6c | error )|..global|
|00001c70| 20 67 57 61 69 73 41 64 | 64 72 65 73 73 0d 67 6c | gWaisAd|dress.gl|
|00001c80| 6f 62 61 6c 20 44 45 42 | 55 47 0d 0d 70 75 74 20 |obal DEB|UG..put |
|00001c90| 30 20 69 6e 74 6f 20 77 | 61 69 73 45 72 72 6f 72 |0 into w|aisError|
|00001ca0| 0d 0d 2d 2d 20 63 6c 6f | 73 65 20 61 20 77 61 69 |..-- clo|se a wai|
|00001cb0| 73 20 73 6f 75 72 63 65 | 0d 69 66 20 63 6f 6e 6e |s source|.if conn|
|00001cc0| 65 63 74 65 64 28 29 20 | 3d 20 31 20 74 68 65 6e |ected() |= 1 then|
|00001cd0| 0d 70 75 74 20 22 43 6c | 6f 73 69 6e 67 20 57 61 |.put "Cl|osing Wa|
|00001ce0| 69 73 20 73 6f 75 72 63 | 65 3a 20 22 26 64 61 74 |is sourc|e: "&dat|
|00001cf0| 61 62 61 73 65 4e 61 6d | 65 20 69 6e 74 6f 20 62 |abaseNam|e into b|
|00001d00| 61 63 6b 67 72 6f 75 6e | 64 20 66 69 65 6c 64 20 |ackgroun|d field |
|00001d10| 22 73 74 61 74 75 73 5f | 6c 69 6e 65 22 0d 0d 70 |"status_|line"..p|
|00001d20| 75 74 20 48 43 43 6c 6f | 73 65 57 61 69 73 53 6f |ut HCClo|seWaisSo|
|00001d30| 75 72 63 65 28 67 57 61 | 69 73 41 64 64 72 65 73 |urce(gWa|isAddres|
|00001d40| 73 2c 20 64 61 74 61 62 | 61 73 65 4e 61 6d 65 2c |s, datab|aseName,|
|00001d50| 20 c2 0d 73 69 74 65 4e | 61 6d 65 2c 20 73 69 74 | ..siteN|ame, sit|
|00001d60| 65 50 6f 72 74 29 20 69 | 6e 74 6f 20 77 61 69 73 |ePort) i|nto wais|
|00001d70| 45 72 72 6f 72 0d 0d 69 | 66 20 44 45 42 55 47 20 |Error..i|f DEBUG |
|00001d80| 3d 20 31 20 74 68 65 6e | 0d 70 75 74 20 22 43 6c |= 1 then|.put "Cl|
|00001d90| 6f 73 65 57 61 69 73 53 | 6f 75 72 63 65 20 28 22 |oseWaisS|ource ("|
|00001da0| 26 64 61 74 61 62 61 73 | 65 4e 61 6d 65 26 22 2c |&databas|eName&",|
|00001db0| 22 26 c2 0d 73 69 74 65 | 4e 61 6d 65 26 22 2c 22 |"&..site|Name&","|
|00001dc0| 26 73 69 74 65 50 6f 72 | 74 26 22 29 20 5b 22 26 |&sitePor|t&") ["&|
|00001dd0| 77 61 69 73 45 72 72 6f | 72 26 22 5d 22 20 69 6e |waisErro|r&"]" in|
|00001de0| 74 6f 20 6d 65 73 73 61 | 67 65 20 62 6f 78 0d 65 |to messa|ge box.e|
|00001df0| 6e 64 20 69 66 0d 0d 70 | 75 74 20 68 61 6e 64 6c |nd if..p|ut handl|
|00001e00| 65 57 61 69 73 45 72 72 | 6f 72 28 77 61 69 73 45 |eWaisErr|or(waisE|
|00001e10| 72 72 6f 72 29 20 69 6e | 74 6f 20 77 61 69 73 45 |rror) in|to waisE|
|00001e20| 72 72 6f 72 0d 0d 70 75 | 74 20 65 6d 70 74 79 20 |rror..pu|t empty |
|00001e30| 69 6e 74 6f 20 62 61 63 | 6b 67 72 6f 75 6e 64 20 |into bac|kground |
|00001e40| 66 69 65 6c 64 20 22 73 | 74 61 74 75 73 5f 6c 69 |field "s|tatus_li|
|00001e50| 6e 65 22 0d 0d 65 6e 64 | 20 69 66 0d 0d 72 65 74 |ne"..end| if..ret|
|00001e60| 75 72 6e 20 77 61 69 73 | 45 72 72 6f 72 0d 0d 65 |urn wais|Error..e|
|00001e70| 6e 64 20 43 6c 6f 73 65 | 57 61 69 73 53 6f 75 72 |nd Close|WaisSour|
|00001e80| 63 65 0d 0d 0d 66 75 6e | 63 74 69 6f 6e 20 53 75 |ce...fun|ction Su|
|00001e90| 62 6d 69 74 51 75 65 72 | 79 20 71 75 65 72 79 54 |bmitQuer|y queryT|
|00001ea0| 65 78 74 0d 2d 2d 20 73 | 75 62 6d 69 74 73 20 61 |ext.-- s|ubmits a|
|00001eb0| 20 71 75 65 72 79 20 74 | 6f 20 61 6c 6c 20 74 68 | query t|o all th|
|00001ec0| 65 20 63 75 72 72 65 6e | 74 6c 79 20 6f 70 65 6e |e curren|tly open|
|00001ed0| 65 64 20 77 61 69 73 20 | 73 6f 75 72 63 65 73 0d |ed wais |sources.|
|00001ee0| 2d 2d 20 74 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |-- this |function|
|00001ef0| 20 72 65 74 75 72 6e 73 | 20 77 68 65 6e 20 61 6c | returns| when al|
|00001f00| 6c 20 74 68 65 20 73 6f | 75 72 63 65 73 20 68 61 |l the so|urces ha|
|00001f10| 76 65 20 62 65 65 6e 20 | 71 75 65 72 69 65 64 0d |ve been |queried.|
|00001f20| 2d 2d 20 61 6e 64 20 61 | 6c 6c 20 74 68 65 20 72 |-- and a|ll the r|
|00001f30| 65 73 75 6c 74 73 20 67 | 61 74 68 65 72 65 64 0d |esults g|athered.|
|00001f40| 2d 2d 20 72 65 74 75 72 | 6e 20 65 72 72 6f 72 20 |-- retur|n error |
|00001f50| 6e 75 6d 62 65 72 20 28 | 20 30 20 2d 20 6e 6f 20 |number (| 0 - no |
|00001f60| 65 72 72 6f 72 20 29 0d | 0d 67 6c 6f 62 61 6c 20 |error ).|.global |
|00001f70| 67 57 61 69 73 41 64 64 | 72 65 73 73 0d 67 6c 6f |gWaisAdd|ress.glo|
|00001f80| 62 61 6c 20 44 45 42 55 | 47 0d 67 6c 6f 62 61 6c |bal DEBU|G.global|
|00001f90| 20 64 69 61 67 73 54 65 | 78 74 0d 0d 0d 70 75 74 | diagsTe|xt...put|
|00001fa0| 20 30 20 69 6e 74 6f 20 | 77 61 69 73 45 72 72 6f | 0 into |waisErro|
|00001fb0| 72 0d 70 75 74 20 65 6d | 70 74 79 20 69 6e 74 6f |r.put em|pty into|
|00001fc0| 20 64 69 61 67 73 54 65 | 78 74 0d 0d 2d 2d 20 73 | diagsTe|xt..-- s|
|00001fd0| 75 62 6d 69 74 20 61 20 | 71 75 65 72 79 20 74 6f |ubmit a |query to|
|00001fe0| 20 61 6c 6c 20 74 68 65 | 20 6f 70 65 6e 20 77 61 | all the| open wa|
|00001ff0| 69 73 20 73 6f 75 72 63 | 65 73 0d 69 66 20 63 6f |is sourc|es.if co|
|00002000| 6e 6e 65 63 74 65 64 28 | 29 20 3d 20 31 20 74 68 |nnected(|) = 1 th|
|00002010| 65 6e 0d 70 75 74 20 22 | 53 65 61 72 63 68 69 6e |en.put "|Searchin|
|00002020| 67 20 57 61 69 73 20 73 | 6f 75 72 63 65 73 22 20 |g Wais s|ources" |
|00002030| 69 6e 74 6f 20 62 61 63 | 6b 67 72 6f 75 6e 64 20 |into bac|kground |
|00002040| 66 69 65 6c 64 20 22 73 | 74 61 74 75 73 5f 6c 69 |field "s|tatus_li|
|00002050| 6e 65 22 0d 0d 70 75 74 | 20 48 43 53 75 62 6d 69 |ne"..put| HCSubmi|
|00002060| 74 51 75 65 72 79 28 67 | 57 61 69 73 41 64 64 72 |tQuery(g|WaisAddr|
|00002070| 65 73 73 2c 20 71 75 65 | 72 79 54 65 78 74 29 20 |ess, que|ryText) |
|00002080| 69 6e 74 6f 20 77 61 69 | 73 45 72 72 6f 72 0d 0d |into wai|sError..|
|00002090| 69 66 20 44 45 42 55 47 | 20 3d 20 31 20 74 68 65 |if DEBUG| = 1 the|
|000020a0| 6e 0d 70 75 74 20 22 53 | 75 62 6d 69 74 51 75 65 |n.put "S|ubmitQue|
|000020b0| 72 79 20 28 22 26 71 75 | 65 72 79 54 65 78 74 26 |ry ("&qu|eryText&|
|000020c0| 22 29 20 5b 22 26 77 61 | 69 73 45 72 72 6f 72 26 |") ["&wa|isError&|
|000020d0| 22 5d 22 20 69 6e 74 6f | 20 6d 65 73 73 61 67 65 |"]" into| message|
|000020e0| 20 62 6f 78 0d 65 6e 64 | 20 69 66 0d 0d 70 75 74 | box.end| if..put|
|000020f0| 20 68 61 6e 64 6c 65 44 | 69 61 67 73 54 65 78 74 | handleD|iagsText|
|00002100| 28 64 69 61 67 73 54 65 | 78 74 29 20 69 6e 74 6f |(diagsTe|xt) into|
|00002110| 20 64 75 6d 6d 79 0d 0d | 70 75 74 20 68 61 6e 64 | dummy..|put hand|
|00002120| 6c 65 57 61 69 73 45 72 | 72 6f 72 28 77 61 69 73 |leWaisEr|ror(wais|
|00002130| 45 72 72 6f 72 29 20 69 | 6e 74 6f 20 77 61 69 73 |Error) i|nto wais|
|00002140| 45 72 72 6f 72 0d 0d 70 | 75 74 20 65 6d 70 74 79 |Error..p|ut empty|
|00002150| 20 69 6e 74 6f 20 62 61 | 63 6b 67 72 6f 75 6e 64 | into ba|ckground|
|00002160| 20 66 69 65 6c 64 20 22 | 73 74 61 74 75 73 5f 6c | field "|status_l|
|00002170| 69 6e 65 22 0d 0d 65 6e | 64 20 69 66 0d 0d 72 65 |ine"..en|d if..re|
|00002180| 74 75 72 6e 20 77 61 69 | 73 45 72 72 6f 72 0d 0d |turn wai|sError..|
|00002190| 65 6e 64 20 53 75 62 6d | 69 74 51 75 65 72 79 0d |end Subm|itQuery.|
|000021a0| 0d 0d 66 75 6e 63 74 69 | 6f 6e 20 47 65 74 44 6f |..functi|on GetDo|
|000021b0| 63 43 6f 75 6e 74 0d 2d | 2d 20 67 65 74 73 20 74 |cCount.-|- gets t|
|000021c0| 68 65 20 63 6f 75 6e 74 | 20 6f 66 20 74 68 65 20 |he count| of the |
|000021d0| 6e 75 6d 62 65 72 20 6f | 66 20 64 6f 63 75 6d 65 |number o|f docume|
|000021e0| 6e 74 73 20 69 6e 20 6f | 75 72 20 72 65 73 75 6c |nts in o|ur resul|
|000021f0| 74 20 62 75 66 66 65 72 | 0d 2d 2d 20 61 6e 64 20 |t buffer|.-- and |
|00002200| 70 6c 61 63 65 73 20 69 | 74 20 69 6e 20 74 68 65 |places i|t in the|
|00002210| 20 67 6c 6f 62 61 6c 20 | 76 61 72 69 61 62 6c 65 | global |variable|
|00002220| 73 20 64 6f 63 43 6f 75 | 6e 74 0d 2d 2d 20 72 65 |s docCou|nt.-- re|
|00002230| 74 75 72 6e 20 65 72 72 | 6f 72 20 6e 75 6d 62 65 |turn err|or numbe|
|00002240| 72 20 28 20 30 20 2d 20 | 6e 6f 20 65 72 72 6f 72 |r ( 0 - |no error|
|00002250| 20 29 0d 0d 67 6c 6f 62 | 61 6c 20 67 57 61 69 73 | )..glob|al gWais|
|00002260| 41 64 64 72 65 73 73 0d | 67 6c 6f 62 61 6c 20 44 |Address.|global D|
|00002270| 45 42 55 47 0d 0d 67 6c | 6f 62 61 6c 20 64 6f 63 |EBUG..gl|obal doc|
|00002280| 43 6f 75 6e 74 0d 0d 70 | 75 74 20 30 20 69 6e 74 |Count..p|ut 0 int|
|00002290| 6f 20 77 61 69 73 45 72 | 72 6f 72 0d 70 75 74 20 |o waisEr|ror.put |
|000022a0| 30 20 69 6e 74 6f 20 64 | 6f 63 43 6f 75 6e 74 0d |0 into d|ocCount.|
|000022b0| 0d 2d 2d 20 67 65 74 20 | 74 68 65 20 63 6f 75 6e |.-- get |the coun|
|000022c0| 74 0d 69 66 20 63 6f 6e | 6e 65 63 74 65 64 28 29 |t.if con|nected()|
|000022d0| 20 3d 20 31 20 74 68 65 | 6e 0d 0d 70 75 74 20 48 | = 1 the|n..put H|
|000022e0| 43 47 65 74 44 6f 63 43 | 6f 75 6e 74 28 67 57 61 |CGetDocC|ount(gWa|
|000022f0| 69 73 41 64 64 72 65 73 | 73 29 20 69 6e 74 6f 20 |isAddres|s) into |
|00002300| 77 61 69 73 45 72 72 6f | 72 0d 0d 70 75 74 20 22 |waisErro|r..put "|
|00002310| 53 65 61 72 63 68 20 63 | 6f 6d 70 6c 65 74 65 2c |Search c|omplete,|
|00002320| 20 22 26 64 6f 63 43 6f | 75 6e 74 26 22 20 68 69 | "&docCo|unt&" hi|
|00002330| 74 73 22 20 69 6e 74 6f | 20 62 61 63 6b 67 72 6f |ts" into| backgro|
|00002340| 75 6e 64 20 66 69 65 6c | 64 20 22 73 74 61 74 75 |und fiel|d "statu|
|00002350| 73 5f 6c 69 6e 65 22 0d | 0d 69 66 20 44 45 42 55 |s_line".|.if DEBU|
|00002360| 47 20 3d 20 31 20 74 68 | 65 6e 0d 70 75 74 20 22 |G = 1 th|en.put "|
|00002370| 47 65 74 44 6f 63 43 6f | 75 6e 74 20 28 22 26 64 |GetDocCo|unt ("&d|
|00002380| 6f 63 43 6f 75 6e 74 26 | 22 29 20 5b 22 26 77 61 |ocCount&|") ["&wa|
|00002390| 69 73 45 72 72 6f 72 26 | 22 5d 22 20 69 6e 74 6f |isError&|"]" into|
|000023a0| 20 6d 65 73 73 61 67 65 | 20 62 6f 78 0d 65 6e 64 | message| box.end|
|000023b0| 20 69 66 0d 0d 70 75 74 | 20 68 61 6e 64 6c 65 57 | if..put| handleW|
|000023c0| 61 69 73 45 72 72 6f 72 | 28 77 61 69 73 45 72 72 |aisError|(waisErr|
|000023d0| 6f 72 29 20 69 6e 74 6f | 20 77 61 69 73 45 72 72 |or) into| waisErr|
|000023e0| 6f 72 0d 0d 70 75 74 20 | 65 6d 70 74 79 20 69 6e |or..put |empty in|
|000023f0| 74 6f 20 62 61 63 6b 67 | 72 6f 75 6e 64 20 66 69 |to backg|round fi|
|00002400| 65 6c 64 20 22 73 74 61 | 74 75 73 5f 6c 69 6e 65 |eld "sta|tus_line|
|00002410| 22 0d 0d 65 6e 64 20 69 | 66 0d 0d 72 65 74 75 72 |"..end i|f..retur|
|00002420| 6e 20 77 61 69 73 45 72 | 72 6f 72 0d 0d 65 6e 64 |n waisEr|ror..end|
|00002430| 20 47 65 74 44 6f 63 43 | 6f 75 6e 74 0d 0d 0d 66 | GetDocC|ount...f|
|00002440| 75 6e 63 74 69 6f 6e 20 | 52 65 61 64 51 75 65 72 |unction |ReadQuer|
|00002450| 79 52 65 73 75 6c 74 20 | 72 65 73 75 6c 74 44 6f |yResult |resultDo|
|00002460| 63 4e 75 6d 0d 2d 2d 20 | 67 65 74 73 20 74 68 65 |cNum.-- |gets the|
|00002470| 20 64 6f 63 75 6d 65 6e | 74 20 68 65 61 64 6c 69 | documen|t headli|
|00002480| 6e 65 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 66 |ne infor|mation f|
|00002490| 72 6f 6d 20 6f 6e 65 20 | 6f 66 20 74 68 65 20 64 |rom one |of the d|
|000024a0| 6f 63 75 6d 65 6e 74 73 | 0d 2d 2d 20 69 6e 20 74 |ocuments|.-- in t|
|000024b0| 68 65 20 72 65 73 75 6c | 74 20 62 75 66 66 65 72 |he resul|t buffer|
|000024c0| 2c 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 20 68 |, the do|cument h|
|000024d0| 65 61 64 6c 69 6e 65 20 | 69 6e 66 6f 72 6d 61 74 |eadline |informat|
|000024e0| 69 6f 6e 20 72 65 74 72 | 69 65 76 65 64 0d 2d 2d |ion retr|ieved.--|
|000024f0| 20 63 6f 72 72 65 73 70 | 6f 6e 64 73 20 74 6f 20 | corresp|onds to |
|00002500| 74 68 65 20 72 65 73 75 | 6c 74 44 6f 63 4e 75 6d |the resu|ltDocNum|
|00002510| 20 70 61 73 73 65 64 20 | 28 6e 6f 74 65 20 74 68 | passed |(note th|
|00002520| 61 74 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 0d |at the d|ocument.|
|00002530| 2d 2d 20 6e 75 6d 62 65 | 72 69 6e 67 20 73 74 61 |-- numbe|ring sta|
|00002540| 72 74 73 20 61 74 20 7a | 65 72 6f 20 72 61 74 68 |rts at z|ero rath|
|00002550| 65 72 20 74 68 61 6e 20 | 31 29 0d 2d 2d 20 74 68 |er than |1).-- th|
|00002560| 65 20 64 61 74 61 20 72 | 65 74 72 69 65 76 65 64 |e data r|etrieved|
|00002570| 20 69 73 20 70 6c 61 63 | 65 64 20 69 6e 74 6f 20 | is plac|ed into |
|00002580| 74 68 65 20 67 6c 6f 62 | 61 6c 20 76 61 72 69 61 |the glob|al varia|
|00002590| 62 6c 65 73 20 6c 69 73 | 74 65 64 20 62 65 6c 6f |bles lis|ted belo|
|000025a0| 77 0d 2d 2d 20 72 65 74 | 75 72 6e 20 65 72 72 6f |w.-- ret|urn erro|
|000025b0| 72 20 6e 75 6d 62 65 72 | 20 28 20 30 20 2d 20 6e |r number| ( 0 - n|
|000025c0| 6f 20 65 72 72 6f 72 20 | 29 0d 0d 67 6c 6f 62 61 |o error |)..globa|
|000025d0| 6c 20 67 57 61 69 73 41 | 64 64 72 65 73 73 0d 67 |l gWaisA|ddress.g|
|000025e0| 6c 6f 62 61 6c 20 44 45 | 42 55 47 0d 0d 2d 2d 20 |lobal DE|BUG..-- |
|000025f0| 64 6f 63 75 6d 65 6e 74 | 20 68 65 61 64 6c 69 6e |document| headlin|
|00002600| 65 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 67 6c |e inform|ation gl|
|00002610| 6f 62 61 6c 73 0d 67 6c | 6f 62 61 6c 20 64 6f 63 |obals.gl|obal doc|
|00002620| 44 61 74 61 62 61 73 65 | 4e 61 6d 65 0d 67 6c 6f |Database|Name.glo|
|00002630| 62 61 6c 20 64 6f 63 53 | 69 74 65 4e 61 6d 65 0d |bal docS|iteName.|
|00002640| 67 6c 6f 62 61 6c 20 64 | 6f 63 53 69 74 65 49 50 |global d|ocSiteIP|
|00002650| 0d 67 6c 6f 62 61 6c 20 | 64 6f 63 53 69 74 65 50 |.global |docSiteP|
|00002660| 6f 72 74 0d 67 6c 6f 62 | 61 6c 20 64 6f 63 53 63 |ort.glob|al docSc|
|00002670| 6f 72 65 0d 67 6c 6f 62 | 61 6c 20 64 6f 63 54 79 |ore.glob|al docTy|
|00002680| 70 65 0d 67 6c 6f 62 61 | 6c 20 64 6f 63 4c 69 6e |pe.globa|l docLin|
|00002690| 65 73 0d 67 6c 6f 62 61 | 6c 20 64 6f 63 4c 65 6e |es.globa|l docLen|
|000026a0| 67 74 68 0d 67 6c 6f 62 | 61 6c 20 64 6f 63 42 65 |gth.glob|al docBe|
|000026b0| 73 74 4d 61 74 63 68 0d | 67 6c 6f 62 61 6c 20 64 |stMatch.|global d|
|000026c0| 6f 63 49 44 0d 67 6c 6f | 62 61 6c 20 64 6f 63 48 |ocID.glo|bal docH|
|000026d0| 65 61 64 6c 69 6e 65 0d | 0d 70 75 74 20 30 20 69 |eadline.|.put 0 i|
|000026e0| 6e 74 6f 20 77 61 69 73 | 45 72 72 6f 72 0d 0d 2d |nto wais|Error..-|
|000026f0| 2d 20 72 65 73 65 74 20 | 6f 75 72 20 64 6f 63 75 |- reset |our docu|
|00002700| 6d 65 6e 74 20 68 65 61 | 64 6c 69 6e 65 20 69 6e |ment hea|dline in|
|00002710| 66 6f 72 6d 61 74 69 6f | 6e 20 67 6c 6f 62 61 6c |formatio|n global|
|00002720| 73 0d 70 75 74 20 65 6d | 70 74 79 20 69 6e 74 6f |s.put em|pty into|
|00002730| 20 64 6f 63 44 61 74 61 | 62 61 73 65 4e 61 6d 65 | docData|baseName|
|00002740| 0d 70 75 74 20 65 6d 70 | 74 79 20 69 6e 74 6f 20 |.put emp|ty into |
|00002750| 64 6f 63 53 69 74 65 4e | 61 6d 65 0d 70 75 74 20 |docSiteN|ame.put |
|00002760| 65 6d 70 74 79 20 69 6e | 74 6f 20 64 6f 63 53 69 |empty in|to docSi|
|00002770| 74 65 49 50 0d 70 75 74 | 20 30 20 69 6e 74 6f 20 |teIP.put| 0 into |
|00002780| 64 6f 63 53 69 74 65 50 | 6f 72 74 0d 70 75 74 20 |docSiteP|ort.put |
|00002790| 30 20 69 6e 74 6f 20 64 | 6f 63 53 63 6f 72 65 0d |0 into d|ocScore.|
|000027a0| 70 75 74 20 65 6d 70 74 | 79 20 69 6e 74 6f 20 64 |put empt|y into d|
|000027b0| 6f 63 54 79 70 65 0d 70 | 75 74 20 30 20 69 6e 74 |ocType.p|ut 0 int|
|000027c0| 6f 20 64 6f 63 4c 69 6e | 65 73 0d 70 75 74 20 30 |o docLin|es.put 0|
|000027d0| 20 69 6e 74 6f 20 64 6f | 63 4c 65 6e 67 74 68 0d | into do|cLength.|
|000027e0| 70 75 74 20 30 20 69 6e | 74 6f 20 64 6f 63 42 65 |put 0 in|to docBe|
|000027f0| 73 74 4d 61 74 63 68 0d | 70 75 74 20 65 6d 70 74 |stMatch.|put empt|
|00002800| 79 20 69 6e 74 6f 20 64 | 6f 63 49 44 0d 70 75 74 |y into d|ocID.put|
|00002810| 20 65 6d 70 74 79 20 69 | 6e 74 6f 20 64 6f 63 48 | empty i|nto docH|
|00002820| 65 61 64 6c 69 6e 65 0d | 0d 0d 2d 2d 20 67 65 74 |eadline.|..-- get|
|00002830| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 20 68 65 | the doc|ument he|
|00002840| 61 64 6c 69 6e 65 20 69 | 6e 66 6f 72 6d 61 74 69 |adline i|nformati|
|00002850| 6f 6e 0d 69 66 20 63 6f | 6e 6e 65 63 74 65 64 28 |on.if co|nnected(|
|00002860| 29 20 3d 20 31 20 74 68 | 65 6e 0d 70 75 74 20 22 |) = 1 th|en.put "|
|00002870| 52 65 61 64 69 6e 67 20 | 64 6f 63 75 6d 65 6e 74 |Reading |document|
|00002880| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 22 20 69 | informa|tion " i|
|00002890| 6e 74 6f 20 62 61 63 6b | 67 72 6f 75 6e 64 20 66 |nto back|ground f|
|000028a0| 69 65 6c 64 20 22 73 74 | 61 74 75 73 5f 6c 69 6e |ield "st|atus_lin|
|000028b0| 65 22 0d 0d 70 75 74 20 | 48 43 52 65 61 64 51 75 |e"..put |HCReadQu|
|000028c0| 65 72 79 52 65 73 75 6c | 74 28 67 57 61 69 73 41 |eryResul|t(gWaisA|
|000028d0| 64 64 72 65 73 73 2c 20 | 72 65 73 75 6c 74 44 6f |ddress, |resultDo|
|000028e0| 63 4e 75 6d 29 20 20 69 | 6e 74 6f 20 77 61 69 73 |cNum) i|nto wais|
|000028f0| 45 72 72 6f 72 0d 0d 69 | 66 20 44 45 42 55 47 20 |Error..i|f DEBUG |
|00002900| 3d 20 31 20 74 68 65 6e | 0d 70 75 74 20 22 52 65 |= 1 then|.put "Re|
|00002910| 61 64 51 75 65 72 79 52 | 65 73 75 6c 74 20 28 22 |adQueryR|esult ("|
|00002920| 26 72 65 73 75 6c 74 44 | 6f 63 4e 75 6d 26 22 29 |&resultD|ocNum&")|
|00002930| 20 5b 22 26 77 61 69 73 | 45 72 72 6f 72 26 22 5d | ["&wais|Error&"]|
|00002940| 22 20 c2 0d 69 6e 74 6f | 20 6d 65 73 73 61 67 65 |" ..into| message|
|00002950| 20 62 6f 78 0d 65 6e 64 | 20 69 66 0d 0d 70 75 74 | box.end| if..put|
|00002960| 20 68 61 6e 64 6c 65 57 | 61 69 73 45 72 72 6f 72 | handleW|aisError|
|00002970| 28 77 61 69 73 45 72 72 | 6f 72 29 20 69 6e 74 6f |(waisErr|or) into|
|00002980| 20 77 61 69 73 45 72 72 | 6f 72 0d 0d 70 75 74 20 | waisErr|or..put |
|00002990| 65 6d 70 74 79 20 69 6e | 74 6f 20 62 61 63 6b 67 |empty in|to backg|
|000029a0| 72 6f 75 6e 64 20 66 69 | 65 6c 64 20 22 73 74 61 |round fi|eld "sta|
|000029b0| 74 75 73 5f 6c 69 6e 65 | 22 0d 0d 65 6e 64 20 69 |tus_line|"..end i|
|000029c0| 66 0d 0d 72 65 74 75 72 | 6e 20 77 61 69 73 45 72 |f..retur|n waisEr|
|000029d0| 72 6f 72 0d 0d 65 6e 64 | 20 52 65 61 64 51 75 65 |ror..end| ReadQue|
|000029e0| 72 79 52 65 73 75 6c 74 | 0d 0d 0d 66 75 6e 63 74 |ryResult|...funct|
|000029f0| 69 6f 6e 20 52 65 61 64 | 51 75 65 72 79 52 65 73 |ion Read|QueryRes|
|00002a00| 75 6c 74 52 61 6e 67 65 | 20 72 65 73 75 6c 74 44 |ultRange| resultD|
|00002a10| 6f 63 4e 75 6d 53 74 61 | 72 74 2c 20 72 65 73 75 |ocNumSta|rt, resu|
|00002a20| 6c 74 44 6f 63 4e 75 6d | 45 6e 64 0d 2d 2d 20 67 |ltDocNum|End.-- g|
|00002a30| 65 74 73 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 |ets the |document|
|00002a40| 20 68 65 61 64 6c 69 6e | 65 20 69 6e 66 6f 72 6d | headlin|e inform|
|00002a50| 61 74 69 6f 6e 20 66 72 | 6f 6d 20 6f 6e 65 20 6f |ation fr|om one o|
|00002a60| 66 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 73 0d |f the do|cuments.|
|00002a70| 2d 2d 20 69 6e 20 74 68 | 65 20 72 65 73 75 6c 74 |-- in th|e result|
|00002a80| 20 62 75 66 66 65 72 2c | 20 74 68 65 20 64 6f 63 | buffer,| the doc|
|00002a90| 75 6d 65 6e 74 20 68 65 | 61 64 6c 69 6e 65 20 69 |ument he|adline i|
|00002aa0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 72 65 74 72 69 |nformati|on retri|
|00002ab0| 65 76 65 64 0d 2d 2d 20 | 63 6f 72 72 65 73 70 6f |eved.-- |correspo|
|00002ac0| 6e 64 73 20 74 6f 20 74 | 68 65 20 72 65 73 75 6c |nds to t|he resul|
|00002ad0| 74 44 6f 63 4e 75 6d 20 | 70 61 73 73 65 64 20 28 |tDocNum |passed (|
|00002ae0| 6e 6f 74 65 20 74 68 61 | 74 20 74 68 65 20 64 6f |note tha|t the do|
|00002af0| 63 75 6d 65 6e 74 0d 2d | 2d 20 6e 75 6d 62 65 72 |cument.-|- number|
|00002b00| 69 6e 67 20 73 74 61 72 | 74 73 20 61 74 20 7a 65 |ing star|ts at ze|
|00002b10| 72 6f 20 72 61 74 68 65 | 72 20 74 68 61 6e 20 31 |ro rathe|r than 1|
|00002b20| 29 0d 2d 2d 20 74 68 65 | 20 64 61 74 61 20 72 65 |).-- the| data re|
|00002b30| 74 72 69 65 76 65 64 20 | 69 73 20 70 6c 61 63 65 |trieved |is place|
|00002b40| 64 20 69 6e 74 6f 20 74 | 68 65 20 67 6c 6f 62 61 |d into t|he globa|
|00002b50| 6c 20 76 61 72 69 61 62 | 6c 65 73 20 6c 69 73 74 |l variab|les list|
|00002b60| 65 64 20 62 65 6c 6f 77 | 0d 2d 2d 20 72 65 74 75 |ed below|.-- retu|
|00002b70| 72 6e 20 65 72 72 6f 72 | 20 6e 75 6d 62 65 72 20 |rn error| number |
|00002b80| 28 20 30 20 2d 20 6e 6f | 20 65 72 72 6f 72 20 29 |( 0 - no| error )|
|00002b90| 0d 0d 67 6c 6f 62 61 6c | 20 67 57 61 69 73 41 64 |..global| gWaisAd|
|00002ba0| 64 72 65 73 73 0d 67 6c | 6f 62 61 6c 20 44 45 42 |dress.gl|obal DEB|
|00002bb0| 55 47 0d 0d 2d 2d 20 64 | 6f 63 75 6d 65 6e 74 20 |UG..-- d|ocument |
|00002bc0| 68 65 61 64 6c 69 6e 65 | 20 72 61 6e 67 65 0d 67 |headline| range.g|
|00002bd0| 6c 6f 62 61 6c 20 64 6f | 63 48 65 61 64 6c 69 6e |lobal do|cHeadlin|
|00002be0| 65 52 61 6e 67 65 0d 0d | 70 75 74 20 30 20 69 6e |eRange..|put 0 in|
|00002bf0| 74 6f 20 77 61 69 73 45 | 72 72 6f 72 0d 0d 2d 2d |to waisE|rror..--|
|00002c00| 20 72 65 73 65 74 20 6f | 75 72 20 64 6f 63 75 6d | reset o|ur docum|
|00002c10| 65 6e 74 20 68 65 61 64 | 6c 69 6e 65 20 69 6e 66 |ent head|line inf|
|00002c20| 6f 72 6d 61 74 69 6f 6e | 20 67 6c 6f 62 61 6c 73 |ormation| globals|
|00002c30| 0d 70 75 74 20 65 6d 70 | 74 79 20 69 6e 74 6f 20 |.put emp|ty into |
|00002c40| 64 6f 63 48 65 61 64 6c | 69 6e 65 42 6c 6f 63 6b |docHeadl|ineBlock|
|00002c50| 0d 0d 0d 2d 2d 20 67 65 | 74 20 74 68 65 20 64 6f |...-- ge|t the do|
|00002c60| 63 75 6d 65 6e 74 20 68 | 65 61 64 6c 69 6e 65 20 |cument h|eadline |
|00002c70| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 0d 69 66 20 63 |informat|ion.if c|
|00002c80| 6f 6e 6e 65 63 74 65 64 | 28 29 20 3d 20 31 20 74 |onnected|() = 1 t|
|00002c90| 68 65 6e 0d 70 75 74 20 | 22 52 65 61 64 69 6e 67 |hen.put |"Reading|
|00002ca0| 20 64 6f 63 75 6d 65 6e | 74 20 69 6e 66 6f 72 6d | documen|t inform|
|00002cb0| 61 74 69 6f 6e 20 22 20 | 69 6e 74 6f 20 62 61 63 |ation " |into bac|
|00002cc0| 6b 67 72 6f 75 6e 64 20 | 66 69 65 6c 64 20 22 73 |kground |field "s|
|00002cd0| 74 61 74 75 73 5f 6c 69 | 6e 65 22 0d 0d 70 75 74 |tatus_li|ne"..put|
|00002ce0| 20 48 43 52 65 61 64 51 | 75 65 72 79 52 65 73 75 | HCReadQ|ueryResu|
|00002cf0| 6c 74 52 61 6e 67 65 28 | 67 57 61 69 73 41 64 64 |ltRange(|gWaisAdd|
|00002d00| 72 65 73 73 2c 20 72 65 | 73 75 6c 74 44 6f 63 4e |ress, re|sultDocN|
|00002d10| 75 6d 53 74 61 72 74 2c | c2 0d 72 65 73 75 6c 74 |umStart,|..result|
|00002d20| 44 6f 63 4e 75 6d 45 6e | 64 29 20 20 69 6e 74 6f |DocNumEn|d) into|
|00002d30| 20 77 61 69 73 45 72 72 | 6f 72 0d 0d 69 66 20 44 | waisErr|or..if D|
|00002d40| 45 42 55 47 20 3d 20 31 | 20 74 68 65 6e 0d 70 75 |EBUG = 1| then.pu|
|00002d50| 74 20 22 52 65 61 64 51 | 75 65 72 79 52 65 73 75 |t "ReadQ|ueryResu|
|00002d60| 6c 74 52 61 6e 67 65 20 | 28 22 26 72 65 73 75 6c |ltRange |("&resul|
|00002d70| 74 44 6f 63 4e 75 6d 53 | 74 61 72 74 26 22 2c 22 |tDocNumS|tart&","|
|00002d80| 26 72 65 73 75 6c 74 44 | 6f 63 4e 75 6d 45 6e 64 |&resultD|ocNumEnd|
|00002d90| 26 22 29 20 5b 22 26 77 | 61 69 73 45 72 72 6f 72 |&") ["&w|aisError|
|00002da0| 26 22 5d 22 20 c2 0d 69 | 6e 74 6f 20 6d 65 73 73 |&"]" ..i|nto mess|
|00002db0| 61 67 65 20 62 6f 78 0d | 65 6e 64 20 69 66 0d 0d |age box.|end if..|
|00002dc0| 70 75 74 20 68 61 6e 64 | 6c 65 57 61 69 73 45 72 |put hand|leWaisEr|
|00002dd0| 72 6f 72 28 77 61 69 73 | 45 72 72 6f 72 29 20 69 |ror(wais|Error) i|
|00002de0| 6e 74 6f 20 77 61 69 73 | 45 72 72 6f 72 0d 0d 70 |nto wais|Error..p|
|00002df0| 75 74 20 65 6d 70 74 79 | 20 69 6e 74 6f 20 62 61 |ut empty| into ba|
|00002e00| 63 6b 67 72 6f 75 6e 64 | 20 66 69 65 6c 64 20 22 |ckground| field "|
|00002e10| 73 74 61 74 75 73 5f 6c | 69 6e 65 22 0d 0d 65 6e |status_l|ine"..en|
|00002e20| 64 20 69 66 0d 0d 72 65 | 74 75 72 6e 20 77 61 69 |d if..re|turn wai|
|00002e30| 73 45 72 72 6f 72 0d 0d | 65 6e 64 20 52 65 61 64 |sError..|end Read|
|00002e40| 51 75 65 72 79 52 65 73 | 75 6c 74 52 61 6e 67 65 |QueryRes|ultRange|
|00002e50| 0d 0d 0d 66 75 6e 63 74 | 69 6f 6e 20 47 65 74 44 |...funct|ion GetD|
|00002e60| 6f 63 20 72 65 73 75 6c | 74 44 6f 63 4e 75 6d 2c |oc resul|tDocNum,|
|00002e70| 20 72 65 73 75 6c 74 44 | 6f 63 54 79 70 65 2c 20 | resultD|ocType, |
|00002e80| 72 65 73 75 6c 74 43 68 | 75 6e 6b 54 79 70 65 2c |resultCh|unkType,|
|00002e90| 20 c2 0d 72 65 73 75 6c | 74 44 6f 63 53 74 61 72 | ..resul|tDocStar|
|00002ea0| 74 2c 20 20 72 65 73 75 | 6c 74 44 6f 63 45 6e 64 |t, resu|ltDocEnd|
|00002eb0| 0d 2d 2d 20 64 6f 77 6e | 6c 6f 61 64 73 20 74 68 |.-- down|loads th|
|00002ec0| 65 20 64 6f 63 75 6d 65 | 6e 74 20 6f 66 20 74 79 |e docume|nt of ty|
|00002ed0| 70 65 20 72 65 73 75 6c | 74 44 6f 63 54 79 70 65 |pe resul|tDocType|
|00002ee0| 20 66 72 6f 6d 20 74 68 | 65 0d 2d 2d 20 72 65 73 | from th|e.-- res|
|00002ef0| 75 6c 74 44 6f 63 53 74 | 61 72 74 20 74 6f 20 74 |ultDocSt|art to t|
|00002f00| 68 65 20 72 65 73 75 6c | 74 44 6f 63 45 6e 64 20 |he resul|tDocEnd |
|00002f10| 77 69 74 68 20 72 65 73 | 70 65 63 74 20 74 6f 20 |with res|pect to |
|00002f20| 72 65 73 75 6c 74 43 68 | 75 6e 6b 54 79 70 65 0d |resultCh|unkType.|
|00002f30| 2d 2d 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 20 |-- the d|ocument |
|00002f40| 72 65 74 72 69 65 76 65 | 64 20 63 6f 72 72 65 73 |retrieve|d corres|
|00002f50| 70 6f 6e 64 73 20 74 6f | 20 74 68 65 20 72 65 73 |ponds to| the res|
|00002f60| 75 6c 74 44 6f 63 4e 75 | 6d 20 70 61 73 73 65 64 |ultDocNu|m passed|
|00002f70| 0d 2d 2d 20 28 6e 6f 74 | 65 20 74 68 61 74 20 74 |.-- (not|e that t|
|00002f80| 68 65 20 64 6f 63 75 6d | 65 6e 74 20 6e 75 6d 62 |he docum|ent numb|
|00002f90| 65 72 69 6e 67 20 73 74 | 61 72 74 73 20 61 74 20 |ering st|arts at |
|00002fa0| 7a 65 72 6f 20 72 61 74 | 68 65 72 20 74 68 61 6e |zero rat|her than|
|00002fb0| 20 31 29 0d 2d 2d 20 74 | 68 65 20 64 6f 63 75 6d | 1).-- t|he docum|
|00002fc0| 65 6e 74 20 72 65 74 72 | 69 65 76 65 64 20 69 73 |ent retr|ieved is|
|00002fd0| 20 70 6c 61 63 65 64 20 | 69 6e 74 6f 20 74 68 65 | placed |into the|
|00002fe0| 20 67 6c 6f 62 61 6c 20 | 76 61 72 69 61 62 6c 65 | global |variable|
|00002ff0| 73 20 6c 69 73 74 65 64 | 20 62 65 6c 6f 77 0d 2d |s listed| below.-|
|00003000| 2d 20 72 65 74 75 72 6e | 20 65 72 72 6f 72 20 6e |- return| error n|
|00003010| 75 6d 62 65 72 20 28 20 | 30 20 2d 20 6e 6f 20 65 |umber ( |0 - no e|
|00003020| 72 72 6f 72 20 29 0d 0d | 67 6c 6f 62 61 6c 20 67 |rror )..|global g|
|00003030| 57 61 69 73 41 64 64 72 | 65 73 73 0d 67 6c 6f 62 |WaisAddr|ess.glob|
|00003040| 61 6c 20 44 45 42 55 47 | 0d 67 6c 6f 62 61 6c 20 |al DEBUG|.global |
|00003050| 64 69 61 67 73 54 65 78 | 74 0d 0d 2d 2d 20 64 6f |diagsTex|t..-- do|
|00003060| 63 75 6d 65 6e 74 20 74 | 65 78 74 20 68 61 6e 64 |cument t|ext hand|
|00003070| 6c 65 20 61 6e 64 20 73 | 69 7a 65 0d 67 6c 6f 62 |le and s|ize.glob|
|00003080| 61 6c 20 64 6f 63 48 64 | 6c 0d 67 6c 6f 62 61 6c |al docHd|l.global|
|00003090| 20 64 6f 63 48 64 6c 53 | 69 7a 65 0d 0d 70 75 74 | docHdlS|ize..put|
|000030a0| 20 30 20 69 6e 74 6f 20 | 77 61 69 73 45 72 72 6f | 0 into |waisErro|
|000030b0| 72 0d 0d 2d 2d 20 72 65 | 73 65 74 20 6f 75 72 20 |r..-- re|set our |
|000030c0| 64 6f 63 75 6d 65 6e 74 | 20 74 65 78 74 20 68 61 |document| text ha|
|000030d0| 6e 64 6c 65 20 61 6e 64 | 20 73 69 7a 65 0d 70 75 |ndle and| size.pu|
|000030e0| 74 20 65 6d 70 74 79 20 | 69 6e 74 6f 20 64 6f 63 |t empty |into doc|
|000030f0| 48 64 6c 0d 70 75 74 20 | 30 20 69 6e 74 6f 20 64 |Hdl.put |0 into d|
|00003100| 6f 63 48 64 6c 53 69 7a | 65 0d 0d 2d 2d 20 72 65 |ocHdlSiz|e..-- re|
|00003110| 73 65 74 20 6f 75 72 20 | 64 69 61 67 73 54 65 78 |set our |diagsTex|
|00003120| 74 0d 70 75 74 20 65 6d | 70 74 79 20 69 6e 74 6f |t.put em|pty into|
|00003130| 20 64 69 61 67 73 54 65 | 78 74 0d 0d 2d 2d 20 67 | diagsTe|xt..-- g|
|00003140| 65 74 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 0d |et the d|ocument.|
|00003150| 69 66 20 63 6f 6e 6e 65 | 63 74 65 64 28 29 20 3d |if conne|cted() =|
|00003160| 20 31 20 74 68 65 6e 0d | 70 75 74 20 22 47 65 74 | 1 then.|put "Get|
|00003170| 74 69 6e 67 20 64 6f 63 | 75 6d 65 6e 74 20 66 72 |ting doc|ument fr|
|00003180| 6f 6d 20 57 61 69 73 20 | 73 6f 75 72 63 65 22 20 |om Wais |source" |
|00003190| 69 6e 74 6f 20 62 61 63 | 6b 67 72 6f 75 6e 64 20 |into bac|kground |
|000031a0| 66 69 65 6c 64 20 22 73 | 74 61 74 75 73 5f 6c 69 |field "s|tatus_li|
|000031b0| 6e 65 22 0d 0d 70 75 74 | 20 48 43 47 65 74 44 6f |ne"..put| HCGetDo|
|000031c0| 63 28 67 57 61 69 73 41 | 64 64 72 65 73 73 2c 20 |c(gWaisA|ddress, |
|000031d0| 72 65 73 75 6c 74 44 6f | 63 4e 75 6d 2c 20 72 65 |resultDo|cNum, re|
|000031e0| 73 75 6c 74 44 6f 63 54 | 79 70 65 2c 20 72 65 73 |sultDocT|ype, res|
|000031f0| 75 6c 74 43 68 75 6e 6b | 54 79 70 65 2c 20 c2 0d |ultChunk|Type, ..|
|00003200| 72 65 73 75 6c 74 44 6f | 63 53 74 61 72 74 2c 20 |resultDo|cStart, |
|00003210| 72 65 73 75 6c 74 44 6f | 63 45 6e 64 29 20 69 6e |resultDo|cEnd) in|
|00003220| 74 6f 20 77 61 69 73 45 | 72 72 6f 72 0d 0d 69 66 |to waisE|rror..if|
|00003230| 20 44 45 42 55 47 20 3d | 20 31 20 74 68 65 6e 0d | DEBUG =| 1 then.|
|00003240| 70 75 74 20 22 47 65 74 | 44 6f 63 20 28 22 26 72 |put "Get|Doc ("&r|
|00003250| 65 73 75 6c 74 44 6f 63 | 4e 75 6d 26 22 2c 22 26 |esultDoc|Num&","&|
|00003260| 72 65 73 75 6c 74 44 6f | 63 54 79 70 65 26 22 2c |resultDo|cType&",|
|00003270| 22 26 72 65 73 75 6c 74 | 43 68 75 6e 6b 54 79 70 |"&result|ChunkTyp|
|00003280| 65 26 22 2c 22 26 72 65 | 73 75 6c 74 44 6f 63 53 |e&","&re|sultDocS|
|00003290| 74 61 72 74 c2 0d 26 22 | 2c 22 26 72 65 73 75 6c |tart..&"|,"&resul|
|000032a0| 74 44 6f 63 45 6e 64 26 | 22 29 20 5b 22 26 77 61 |tDocEnd&|") ["&wa|
|000032b0| 69 73 45 72 72 6f 72 26 | 22 5d 22 20 69 6e 74 6f |isError&|"]" into|
|000032c0| 20 6d 65 73 73 61 67 65 | 20 62 6f 78 0d 65 6e 64 | message| box.end|
|000032d0| 20 69 66 0d 0d 70 75 74 | 20 68 61 6e 64 6c 65 44 | if..put| handleD|
|000032e0| 69 61 67 73 54 65 78 74 | 28 64 69 61 67 73 54 65 |iagsText|(diagsTe|
|000032f0| 78 74 29 20 69 6e 74 6f | 20 64 75 6d 6d 79 0d 0d |xt) into| dummy..|
|00003300| 70 75 74 20 68 61 6e 64 | 6c 65 57 61 69 73 45 72 |put hand|leWaisEr|
|00003310| 72 6f 72 28 77 61 69 73 | 45 72 72 6f 72 29 20 69 |ror(wais|Error) i|
|00003320| 6e 74 6f 20 77 61 69 73 | 45 72 72 6f 72 0d 0d 70 |nto wais|Error..p|
|00003330| 75 74 20 65 6d 70 74 79 | 20 69 6e 74 6f 20 62 61 |ut empty| into ba|
|00003340| 63 6b 67 72 6f 75 6e 64 | 20 66 69 65 6c 64 20 22 |ckground| field "|
|00003350| 73 74 61 74 75 73 5f 6c | 69 6e 65 22 0d 0d 65 6e |status_l|ine"..en|
|00003360| 64 20 69 66 0d 0d 72 65 | 74 75 72 6e 20 77 61 69 |d if..re|turn wai|
|00003370| 73 45 72 72 6f 72 0d 0d | 65 6e 64 20 47 65 74 44 |sError..|end GetD|
|00003380| 6f 63 0d 0d 0d 66 75 6e | 63 74 69 6f 6e 20 47 65 |oc...fun|ction Ge|
|00003390| 74 44 6f 63 42 79 49 44 | 20 64 61 74 61 62 61 73 |tDocByID| databas|
|000033a0| 65 4e 61 6d 65 2c 20 73 | 69 74 65 4e 61 6d 65 2c |eName, s|iteName,|
|000033b0| 20 73 69 74 65 49 50 2c | 20 73 69 74 65 50 6f 72 | siteIP,| sitePor|
|000033c0| 74 2c 20 64 6f 63 75 6d | 65 6e 74 49 44 2c 20 c2 |t, docum|entID, .|
|000033d0| 0d 72 65 73 75 6c 74 44 | 6f 63 54 79 70 65 2c 20 |.resultD|ocType, |
|000033e0| 72 65 73 75 6c 74 43 68 | 75 6e 6b 54 79 70 65 2c |resultCh|unkType,|
|000033f0| 20 72 65 73 75 6c 74 44 | 6f 63 53 74 61 72 74 2c | resultD|ocStart,|
|00003400| 20 72 65 73 75 6c 74 44 | 6f 63 45 6e 64 0d 2d 2d | resultD|ocEnd.--|
|00003410| 20 64 6f 77 6e 6c 6f 61 | 64 73 20 74 68 65 20 64 | downloa|ds the d|
|00003420| 6f 63 75 6d 65 6e 74 20 | 73 70 65 63 69 66 69 65 |ocument |specifie|
|00003430| 64 20 62 79 20 74 68 65 | 20 64 6f 63 75 6d 65 6e |d by the| documen|
|00003440| 74 49 44 20 66 72 6f 6d | 20 74 68 65 0d 2d 2d 20 |tID from| the.-- |
|00003450| 72 65 73 75 6c 74 44 6f | 63 53 74 61 72 74 20 74 |resultDo|cStart t|
|00003460| 6f 20 74 68 65 20 72 65 | 73 75 6c 74 44 6f 63 45 |o the re|sultDocE|
|00003470| 6e 64 20 77 69 74 68 20 | 72 65 73 70 65 63 74 20 |nd with |respect |
|00003480| 74 6f 20 72 65 73 75 6c | 74 43 68 75 6e 6b 54 79 |to resul|tChunkTy|
|00003490| 70 65 0d 2d 2d 20 74 68 | 65 20 64 6f 63 75 6d 65 |pe.-- th|e docume|
|000034a0| 6e 74 20 72 65 74 72 69 | 65 76 65 64 20 69 73 20 |nt retri|eved is |
|000034b0| 70 6c 61 63 65 64 20 69 | 6e 74 6f 20 74 68 65 20 |placed i|nto the |
|000034c0| 67 6c 6f 62 61 6c 20 76 | 61 72 69 61 62 6c 65 73 |global v|ariables|
|000034d0| 20 6c 69 73 74 65 64 20 | 62 65 6c 6f 77 0d 0d 67 | listed |below..g|
|000034e0| 6c 6f 62 61 6c 20 67 57 | 61 69 73 41 64 64 72 65 |lobal gW|aisAddre|
|000034f0| 73 73 0d 67 6c 6f 62 61 | 6c 20 44 45 42 55 47 0d |ss.globa|l DEBUG.|
|00003500| 67 6c 6f 62 61 6c 20 64 | 69 61 67 73 54 65 78 74 |global d|iagsText|
|00003510| 0d 0d 2d 2d 20 64 6f 63 | 75 6d 65 6e 74 20 74 65 |..-- doc|ument te|
|00003520| 78 74 20 68 61 6e 64 6c | 65 20 61 6e 64 20 73 69 |xt handl|e and si|
|00003530| 7a 65 0d 67 6c 6f 62 61 | 6c 20 64 6f 63 48 64 6c |ze.globa|l docHdl|
|00003540| 0d 67 6c 6f 62 61 6c 20 | 64 6f 63 48 64 6c 53 69 |.global |docHdlSi|
|00003550| 7a 65 0d 0d 70 75 74 20 | 30 20 69 6e 74 6f 20 77 |ze..put |0 into w|
|00003560| 61 69 73 45 72 72 6f 72 | 0d 70 75 74 20 65 6d 70 |aisError|.put emp|
|00003570| 74 79 20 69 6e 74 6f 20 | 64 69 61 67 73 54 65 78 |ty into |diagsTex|
|00003580| 74 0d 0d 2d 2d 20 72 65 | 73 65 74 20 6f 75 72 20 |t..-- re|set our |
|00003590| 64 6f 63 75 6d 65 6e 74 | 20 74 65 78 74 20 68 61 |document| text ha|
|000035a0| 6e 64 6c 65 20 61 6e 64 | 20 73 69 7a 65 0d 70 75 |ndle and| size.pu|
|000035b0| 74 20 65 6d 70 74 79 20 | 69 6e 74 6f 20 64 6f 63 |t empty |into doc|
|000035c0| 48 64 6c 0d 70 75 74 20 | 30 20 69 6e 74 6f 20 64 |Hdl.put |0 into d|
|000035d0| 6f 63 48 64 6c 53 69 7a | 65 0d 0d 2d 2d 20 67 65 |ocHdlSiz|e..-- ge|
|000035e0| 74 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 20 62 |t the do|cument b|
|000035f0| 79 20 49 44 0d 69 66 20 | 63 6f 6e 6e 65 63 74 65 |y ID.if |connecte|
|00003600| 64 28 29 20 3d 20 31 20 | 74 68 65 6e 0d 70 75 74 |d() = 1 |then.put|
|00003610| 20 22 47 65 74 74 69 6e | 67 20 64 6f 63 75 6d 65 | "Gettin|g docume|
|00003620| 6e 74 20 66 72 6f 6d 20 | 57 61 69 73 20 73 6f 75 |nt from |Wais sou|
|00003630| 72 63 65 22 20 69 6e 74 | 6f 20 62 61 63 6b 67 72 |rce" int|o backgr|
|00003640| 6f 75 6e 64 20 66 69 65 | 6c 64 20 22 73 74 61 74 |ound fie|ld "stat|
|00003650| 75 73 5f 6c 69 6e 65 22 | 0d 0d 70 75 74 20 48 43 |us_line"|..put HC|
|00003660| 47 65 74 44 6f 63 42 79 | 49 44 28 67 57 61 69 73 |GetDocBy|ID(gWais|
|00003670| 41 64 64 72 65 73 73 2c | 64 61 74 61 62 61 73 65 |Address,|database|
|00003680| 4e 61 6d 65 2c 20 73 69 | 74 65 4e 61 6d 65 2c 73 |Name, si|teName,s|
|00003690| 69 74 65 49 50 2c 20 c2 | 0d 73 69 74 65 50 6f 72 |iteIP, .|.sitePor|
|000036a0| 74 2c 20 64 6f 63 75 6d | 65 6e 74 49 44 2c 20 72 |t, docum|entID, r|
|000036b0| 65 73 75 6c 74 44 6f 63 | 54 79 70 65 2c 20 72 65 |esultDoc|Type, re|
|000036c0| 73 75 6c 74 43 68 75 6e | 6b 54 79 70 65 2c 20 c2 |sultChun|kType, .|
|000036d0| 0d 72 65 73 75 6c 74 44 | 6f 63 53 74 61 72 74 2c |.resultD|ocStart,|
|000036e0| 20 72 65 73 75 6c 74 44 | 6f 63 45 6e 64 29 20 69 | resultD|ocEnd) i|
|000036f0| 6e 74 6f 20 77 61 69 73 | 45 72 72 6f 72 0d 0d 69 |nto wais|Error..i|
|00003700| 66 20 44 45 42 55 47 20 | 3d 20 31 20 74 68 65 6e |f DEBUG |= 1 then|
|00003710| 0d 70 75 74 20 22 47 65 | 74 44 6f 63 42 79 49 44 |.put "Ge|tDocByID|
|00003720| 20 28 22 26 64 61 74 61 | 62 61 73 65 4e 61 6d 65 | ("&data|baseName|
|00003730| 26 22 2c 22 26 73 69 74 | 65 4e 61 6d 65 26 22 2c |&","&sit|eName&",|
|00003740| 22 26 73 69 74 65 49 50 | 26 22 2c 22 26 73 69 74 |"&siteIP|&","&sit|
|00003750| 65 50 6f 72 74 c2 0d 26 | 22 2c 22 26 64 6f 63 75 |ePort..&|","&docu|
|00003760| 6d 65 6e 74 49 44 26 22 | 2c 22 26 72 65 73 75 6c |mentID&"|,"&resul|
|00003770| 74 44 6f 63 54 79 70 65 | 26 22 2c 22 26 72 65 73 |tDocType|&","&res|
|00003780| 75 6c 74 43 68 75 6e 6b | 54 79 70 65 c2 0d 26 22 |ultChunk|Type..&"|
|00003790| 2c 22 26 72 65 73 75 6c | 74 44 6f 63 53 74 61 72 |,"&resul|tDocStar|
|000037a0| 74 26 22 2c 22 26 72 65 | 73 75 6c 74 44 6f 63 45 |t&","&re|sultDocE|
|000037b0| 6e 64 26 22 29 20 5b 22 | 26 77 61 69 73 45 72 72 |nd&") ["|&waisErr|
|000037c0| 6f 72 26 22 5d 22 20 c2 | 0d 69 6e 74 6f 20 6d 65 |or&"]" .|.into me|
|000037d0| 73 73 61 67 65 20 62 6f | 78 0d 65 6e 64 20 69 66 |ssage bo|x.end if|
|000037e0| 0d 0d 70 75 74 20 68 61 | 6e 64 6c 65 44 69 61 67 |..put ha|ndleDiag|
|000037f0| 73 54 65 78 74 28 64 69 | 61 67 73 54 65 78 74 29 |sText(di|agsText)|
|00003800| 20 69 6e 74 6f 20 64 75 | 6d 6d 79 0d 0d 70 75 74 | into du|mmy..put|
|00003810| 20 68 61 6e 64 6c 65 57 | 61 69 73 45 72 72 6f 72 | handleW|aisError|
|00003820| 28 77 61 69 73 45 72 72 | 6f 72 29 20 69 6e 74 6f |(waisErr|or) into|
|00003830| 20 77 61 69 73 45 72 72 | 6f 72 0d 0d 70 75 74 20 | waisErr|or..put |
|00003840| 65 6d 70 74 79 20 69 6e | 74 6f 20 62 61 63 6b 67 |empty in|to backg|
|00003850| 72 6f 75 6e 64 20 66 69 | 65 6c 64 20 22 73 74 61 |round fi|eld "sta|
|00003860| 74 75 73 5f 6c 69 6e 65 | 22 0d 0d 65 6e 64 20 69 |tus_line|"..end i|
|00003870| 66 0d 0d 72 65 74 75 72 | 6e 20 77 61 69 73 45 72 |f..retur|n waisEr|
|00003880| 72 6f 72 0d 0d 65 6e 64 | 20 47 65 74 44 6f 63 42 |ror..end| GetDocB|
|00003890| 79 49 44 0d 0d 0d 66 75 | 6e 63 74 69 6f 6e 20 47 |yID...fu|nction G|
|000038a0| 65 74 44 6f 63 54 6f 46 | 69 6c 65 20 72 65 73 75 |etDocToF|ile resu|
|000038b0| 6c 74 44 6f 63 4e 75 6d | 2c 20 72 65 73 75 6c 74 |ltDocNum|, result|
|000038c0| 44 6f 63 54 79 70 65 2c | 20 64 6f 63 46 69 6c 65 |DocType,| docFile|
|000038d0| 4e 61 6d 65 2c 20 64 6f | 63 46 69 6c 65 43 72 65 |Name, do|cFileCre|
|000038e0| 61 74 6f 72 2c 20 c2 0d | 64 6f 63 46 69 6c 65 54 |ator, ..|docFileT|
|000038f0| 79 70 65 0d 2d 2d 20 64 | 6f 77 6e 6c 6f 61 64 73 |ype.-- d|ownloads|
|00003900| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 20 74 6f | the doc|ument to|
|00003910| 20 61 20 66 69 6c 65 20 | 73 70 65 63 69 66 69 65 | a file |specifie|
|00003920| 64 20 62 79 20 64 6f 63 | 46 69 6c 65 4e 61 6d 65 |d by doc|FileName|
|00003930| 20 61 6e 64 0d 2d 2d 20 | 73 65 74 73 20 74 68 65 | and.-- |sets the|
|00003940| 20 66 69 6c 65 20 74 79 | 70 65 20 61 6e 64 20 66 | file ty|pe and f|
|00003950| 69 6c 65 20 63 72 65 61 | 74 6f 72 20 74 6f 20 64 |ile crea|tor to d|
|00003960| 6f 63 46 69 6c 65 54 79 | 70 65 20 61 6e 64 20 64 |ocFileTy|pe and d|
|00003970| 6f 63 46 69 6c 65 43 72 | 65 61 74 6f 72 0d 2d 2d |ocFileCr|eator.--|
|00003980| 20 72 65 73 70 65 63 74 | 69 76 65 6c 79 0d 2d 2d | respect|ively.--|
|00003990| 20 74 68 65 20 77 68 6f | 6c 65 20 64 6f 63 75 6d | the who|le docum|
|000039a0| 65 6e 74 20 69 73 20 64 | 6f 77 6e 6c 6f 61 64 65 |ent is d|ownloade|
|000039b0| 64 0d 2d 2d 20 74 68 65 | 20 64 6f 63 75 6d 65 6e |d.-- the| documen|
|000039c0| 74 20 72 65 74 72 69 65 | 76 65 64 20 63 6f 72 72 |t retrie|ved corr|
|000039d0| 65 73 70 6f 6e 64 73 20 | 74 6f 20 74 68 65 20 72 |esponds |to the r|
|000039e0| 65 73 75 6c 74 44 6f 63 | 4e 75 6d 20 70 61 73 73 |esultDoc|Num pass|
|000039f0| 65 64 0d 2d 2d 20 28 6e | 6f 74 65 20 74 68 61 74 |ed.-- (n|ote that|
|00003a00| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 20 6e 75 | the doc|ument nu|
|00003a10| 6d 62 65 72 69 6e 67 20 | 73 74 61 72 74 73 20 61 |mbering |starts a|
|00003a20| 74 20 7a 65 72 6f 20 72 | 61 74 68 65 72 20 74 68 |t zero r|ather th|
|00003a30| 61 6e 20 31 29 0d 2d 2d | 20 72 65 74 75 72 6e 20 |an 1).--| return |
|00003a40| 65 72 72 6f 72 20 6e 75 | 6d 62 65 72 20 28 20 30 |error nu|mber ( 0|
|00003a50| 20 2d 20 6e 6f 20 65 72 | 72 6f 72 20 29 0d 0d 67 | - no er|ror )..g|
|00003a60| 6c 6f 62 61 6c 20 67 57 | 61 69 73 41 64 64 72 65 |lobal gW|aisAddre|
|00003a70| 73 73 0d 67 6c 6f 62 61 | 6c 20 44 45 42 55 47 0d |ss.globa|l DEBUG.|
|00003a80| 67 6c 6f 62 61 6c 20 64 | 69 61 67 73 54 65 78 74 |global d|iagsText|
|00003a90| 0d 0d 70 75 74 20 30 20 | 69 6e 74 6f 20 77 61 69 |..put 0 |into wai|
|00003aa0| 73 45 72 72 6f 72 0d 70 | 75 74 20 65 6d 70 74 79 |sError.p|ut empty|
|00003ab0| 20 69 6e 74 6f 20 64 69 | 61 67 73 54 65 78 74 0d | into di|agsText.|
|00003ac0| 0d 2d 2d 20 67 65 74 20 | 74 68 65 20 64 6f 63 75 |.-- get |the docu|
|00003ad0| 6d 65 6e 74 20 61 6e 64 | 20 77 72 69 74 65 20 69 |ment and| write i|
|00003ae0| 74 20 6f 75 74 20 74 6f | 20 61 20 66 69 6c 65 0d |t out to| a file.|
|00003af0| 69 66 20 63 6f 6e 6e 65 | 63 74 65 64 28 29 20 3d |if conne|cted() =|
|00003b00| 20 31 20 74 68 65 6e 0d | 70 75 74 20 22 44 6f 77 | 1 then.|put "Dow|
|00003b10| 6e 6c 6f 61 64 69 6e 67 | 20 64 6f 63 75 6d 65 6e |nloading| documen|
|00003b20| 74 20 66 72 6f 6d 20 57 | 61 69 73 20 73 6f 75 72 |t from W|ais sour|
|00003b30| 63 65 20 74 6f 20 61 20 | 66 69 6c 65 22 20 69 6e |ce to a |file" in|
|00003b40| 74 6f 20 62 61 63 6b 67 | 72 6f 75 6e 64 20 66 69 |to backg|round fi|
|00003b50| 65 6c 64 20 22 73 74 61 | 74 75 73 5f 6c 69 6e 65 |eld "sta|tus_line|
|00003b60| 22 0d 0d 70 75 74 20 48 | 43 47 65 74 44 6f 63 54 |"..put H|CGetDocT|
|00003b70| 6f 46 69 6c 65 28 67 57 | 61 69 73 41 64 64 72 65 |oFile(gW|aisAddre|
|00003b80| 73 73 2c 20 72 65 73 75 | 6c 74 44 6f 63 4e 75 6d |ss, resu|ltDocNum|
|00003b90| 2c 20 72 65 73 75 6c 74 | 44 6f 63 54 79 70 65 2c |, result|DocType,|
|00003ba0| 20 c2 0d 64 6f 63 46 69 | 6c 65 4e 61 6d 65 2c 20 | ..docFi|leName, |
|00003bb0| 64 6f 63 46 69 6c 65 43 | 72 65 61 74 6f 72 2c 20 |docFileC|reator, |
|00003bc0| 64 6f 63 46 69 6c 65 54 | 79 70 65 29 20 69 6e 74 |docFileT|ype) int|
|00003bd0| 6f 20 77 61 69 73 45 72 | 72 6f 72 0d 0d 69 66 20 |o waisEr|ror..if |
|00003be0| 44 45 42 55 47 20 3d 20 | 31 20 74 68 65 6e 0d 70 |DEBUG = |1 then.p|
|00003bf0| 75 74 20 22 47 65 74 44 | 6f 63 54 6f 46 69 6c 65 |ut "GetD|ocToFile|
|00003c00| 20 28 22 26 72 65 73 75 | 6c 74 44 6f 63 54 79 70 | ("&resu|ltDocTyp|
|00003c10| 65 26 22 2c 22 26 72 65 | 73 75 6c 74 44 6f 63 4e |e&","&re|sultDocN|
|00003c20| 75 6d 26 22 2c 22 26 64 | 6f 63 46 69 6c 65 4e 61 |um&","&d|ocFileNa|
|00003c30| 6d 65 c2 0d 26 22 2c 22 | 26 64 6f 63 46 69 6c 65 |me..&","|&docFile|
|00003c40| 43 72 65 61 74 6f 72 20 | 26 22 2c 22 26 64 6f 63 |Creator |&","&doc|
|00003c50| 46 69 6c 65 54 79 70 65 | 26 22 29 20 5b 22 26 77 |FileType|&") ["&w|
|00003c60| 61 69 73 45 72 72 6f 72 | 26 22 5d 22 20 c2 0d 69 |aisError|&"]" ..i|
|00003c70| 6e 74 6f 20 6d 65 73 73 | 61 67 65 20 62 6f 78 0d |nto mess|age box.|
|00003c80| 65 6e 64 20 69 66 0d 0d | 70 75 74 20 68 61 6e 64 |end if..|put hand|
|00003c90| 6c 65 44 69 61 67 73 54 | 65 78 74 28 64 69 61 67 |leDiagsT|ext(diag|
|00003ca0| 73 54 65 78 74 29 20 69 | 6e 74 6f 20 64 75 6d 6d |sText) i|nto dumm|
|00003cb0| 79 0d 0d 70 75 74 20 68 | 61 6e 64 6c 65 57 61 69 |y..put h|andleWai|
|00003cc0| 73 45 72 72 6f 72 28 77 | 61 69 73 45 72 72 6f 72 |sError(w|aisError|
|00003cd0| 29 20 69 6e 74 6f 20 77 | 61 69 73 45 72 72 6f 72 |) into w|aisError|
|00003ce0| 0d 0d 70 75 74 20 65 6d | 70 74 79 20 69 6e 74 6f |..put em|pty into|
|00003cf0| 20 62 61 63 6b 67 72 6f | 75 6e 64 20 66 69 65 6c | backgro|und fiel|
|00003d00| 64 20 22 73 74 61 74 75 | 73 5f 6c 69 6e 65 22 0d |d "statu|s_line".|
|00003d10| 0d 65 6e 64 20 69 66 0d | 0d 72 65 74 75 72 6e 20 |.end if.|.return |
|00003d20| 77 61 69 73 45 72 72 6f | 72 0d 0d 65 6e 64 20 47 |waisErro|r..end G|
|00003d30| 65 74 44 6f 63 54 6f 46 | 69 6c 65 0d 0d 0d 66 75 |etDocToF|ile...fu|
|00003d40| 6e 63 74 69 6f 6e 20 47 | 65 74 44 6f 63 54 6f 46 |nction G|etDocToF|
|00003d50| 69 6c 65 42 79 49 44 20 | 64 61 74 61 62 61 73 65 |ileByID |database|
|00003d60| 4e 61 6d 65 2c 20 73 69 | 74 65 4e 61 6d 65 2c 20 |Name, si|teName, |
|00003d70| 73 69 74 65 49 50 2c 20 | 73 69 74 65 50 6f 72 74 |siteIP, |sitePort|
|00003d80| 2c 20 64 6f 63 75 6d 65 | 6e 74 49 44 2c 20 c2 0d |, docume|ntID, ..|
|00003d90| 72 65 73 75 6c 74 44 6f | 63 54 79 70 65 2c 20 64 |resultDo|cType, d|
|00003da0| 6f 63 46 69 6c 65 4e 61 | 6d 65 2c 20 64 6f 63 46 |ocFileNa|me, docF|
|00003db0| 69 6c 65 43 72 65 61 74 | 6f 72 2c 20 64 6f 63 46 |ileCreat|or, docF|
|00003dc0| 69 6c 65 54 79 70 65 0d | 2d 2d 20 64 6f 77 6e 6c |ileType.|-- downl|
|00003dd0| 6f 61 64 73 20 74 68 65 | 20 64 6f 63 75 6d 65 6e |oads the| documen|
|00003de0| 74 20 73 70 65 63 69 66 | 69 65 64 20 62 79 20 64 |t specif|ied by d|
|00003df0| 6f 63 75 6d 65 6e 74 49 | 44 20 74 6f 20 61 20 66 |ocumentI|D to a f|
|00003e00| 69 6c 65 20 73 70 65 63 | 69 66 69 65 64 0d 2d 2d |ile spec|ified.--|
|00003e10| 20 62 79 20 64 6f 63 46 | 69 6c 65 4e 61 6d 65 20 | by docF|ileName |
|00003e20| 61 6e 64 20 73 65 74 73 | 20 74 68 65 20 66 69 6c |and sets| the fil|
|00003e30| 65 20 74 79 70 65 20 61 | 6e 64 20 66 69 6c 65 20 |e type a|nd file |
|00003e40| 63 72 65 61 74 6f 72 20 | 74 6f 0d 2d 2d 20 64 6f |creator |to.-- do|
|00003e50| 63 46 69 6c 65 54 79 70 | 65 20 61 6e 64 20 64 6f |cFileTyp|e and do|
|00003e60| 63 46 69 6c 65 43 72 65 | 61 74 6f 72 20 72 65 73 |cFileCre|ator res|
|00003e70| 70 65 63 74 69 76 65 6c | 79 0d 2d 2d 20 74 68 65 |pectivel|y.-- the|
|00003e80| 20 77 68 6f 6c 65 20 64 | 6f 63 75 6d 65 6e 74 20 | whole d|ocument |
|00003e90| 69 73 20 64 6f 77 6e 6c | 6f 61 64 65 64 0d 2d 2d |is downl|oaded.--|
|00003ea0| 20 72 65 74 75 72 6e 20 | 65 72 72 6f 72 20 6e 75 | return |error nu|
|00003eb0| 6d 62 65 72 20 28 20 30 | 20 2d 20 6e 6f 20 65 72 |mber ( 0| - no er|
|00003ec0| 72 6f 72 20 29 0d 0d 67 | 6c 6f 62 61 6c 20 67 57 |ror )..g|lobal gW|
|00003ed0| 61 69 73 41 64 64 72 65 | 73 73 0d 67 6c 6f 62 61 |aisAddre|ss.globa|
|00003ee0| 6c 20 44 45 42 55 47 0d | 67 6c 6f 62 61 6c 20 64 |l DEBUG.|global d|
|00003ef0| 69 61 67 73 54 65 78 74 | 0d 0d 70 75 74 20 30 20 |iagsText|..put 0 |
|00003f00| 69 6e 74 6f 20 77 61 69 | 73 45 72 72 6f 72 0d 70 |into wai|sError.p|
|00003f10| 75 74 20 65 6d 70 74 79 | 20 69 6e 74 6f 20 64 69 |ut empty| into di|
|00003f20| 61 67 73 54 65 78 74 0d | 0d 2d 2d 20 67 65 74 20 |agsText.|.-- get |
|00003f30| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 20 62 79 20 |the docu|ment by |
|00003f40| 49 44 20 61 6e 64 20 77 | 72 69 74 65 20 69 74 20 |ID and w|rite it |
|00003f50| 6f 75 74 20 74 6f 20 61 | 20 66 69 6c 65 0d 69 66 |out to a| file.if|
|00003f60| 20 63 6f 6e 6e 65 63 74 | 65 64 28 29 20 3d 20 31 | connect|ed() = 1|
|00003f70| 20 74 68 65 6e 0d 70 75 | 74 20 22 44 6f 77 6e 6c | then.pu|t "Downl|
|00003f80| 6f 61 64 69 6e 67 20 64 | 6f 63 75 6d 65 6e 74 20 |oading d|ocument |
|00003f90| 66 72 6f 6d 20 57 61 69 | 73 20 73 6f 75 72 63 65 |from Wai|s source|
|00003fa0| 20 74 6f 20 61 20 66 69 | 6c 65 22 20 69 6e 74 6f | to a fi|le" into|
|00003fb0| 20 62 61 63 6b 67 72 6f | 75 6e 64 20 66 69 65 6c | backgro|und fiel|
|00003fc0| 64 20 22 73 74 61 74 75 | 73 5f 6c 69 6e 65 22 0d |d "statu|s_line".|
|00003fd0| 0d 70 75 74 20 48 43 47 | 65 74 44 6f 63 54 6f 46 |.put HCG|etDocToF|
|00003fe0| 69 6c 65 42 79 49 44 28 | 67 57 61 69 73 41 64 64 |ileByID(|gWaisAdd|
|00003ff0| 72 65 73 73 2c 64 61 74 | 61 62 61 73 65 4e 61 6d |ress,dat|abaseNam|
|00004000| 65 2c 20 73 69 74 65 4e | 61 6d 65 2c 20 73 69 74 |e, siteN|ame, sit|
|00004010| 65 49 50 2c 20 c2 0d 73 | 69 74 65 50 6f 72 74 2c |eIP, ..s|itePort,|
|00004020| 20 64 6f 63 75 6d 65 6e | 74 49 44 2c 20 72 65 73 | documen|tID, res|
|00004030| 75 6c 74 44 6f 63 54 79 | 70 65 2c 20 64 6f 63 46 |ultDocTy|pe, docF|
|00004040| 69 6c 65 4e 61 6d 65 2c | 20 64 6f 63 46 69 6c 65 |ileName,| docFile|
|00004050| 43 72 65 61 74 6f 72 2c | 20 c2 0d 64 6f 63 46 69 |Creator,| ..docFi|
|00004060| 6c 65 54 79 70 65 29 20 | 69 6e 74 6f 20 77 61 69 |leType) |into wai|
|00004070| 73 45 72 72 6f 72 0d 0d | 69 66 20 44 45 42 55 47 |sError..|if DEBUG|
|00004080| 20 3d 20 31 20 74 68 65 | 6e 0d 70 75 74 20 22 47 | = 1 the|n.put "G|
|00004090| 65 74 44 6f 63 42 79 49 | 44 20 28 22 26 64 61 74 |etDocByI|D ("&dat|
|000040a0| 61 62 61 73 65 4e 61 6d | 65 26 22 2c 22 26 73 69 |abaseNam|e&","&si|
|000040b0| 74 65 4e 61 6d 65 26 22 | 2c 22 26 73 69 74 65 49 |teName&"|,"&siteI|
|000040c0| 50 26 22 2c 22 26 73 69 | 74 65 50 6f 72 74 c2 0d |P&","&si|tePort..|
|000040d0| 26 22 2c 22 26 64 6f 63 | 75 6d 65 6e 74 49 44 26 |&","&doc|umentID&|
|000040e0| 22 2c 22 26 72 65 73 75 | 6c 74 44 6f 63 54 79 70 |","&resu|ltDocTyp|
|000040f0| 65 26 22 2c 22 26 64 6f | 63 46 69 6c 65 4e 61 6d |e&","&do|cFileNam|
|00004100| 65 c2 0d 26 22 2c 22 26 | 64 6f 63 46 69 6c 65 43 |e..&","&|docFileC|
|00004110| 72 65 61 74 6f 72 26 22 | 2c 22 26 64 6f 63 46 69 |reator&"|,"&docFi|
|00004120| 6c 65 54 79 70 65 26 22 | 29 20 5b 22 26 77 61 69 |leType&"|) ["&wai|
|00004130| 73 45 72 72 6f 72 26 22 | 5d 22 20 c2 0d 69 6e 74 |sError&"|]" ..int|
|00004140| 6f 20 6d 65 73 73 61 67 | 65 20 62 6f 78 0d 65 6e |o messag|e box.en|
|00004150| 64 20 69 66 0d 0d 70 75 | 74 20 68 61 6e 64 6c 65 |d if..pu|t handle|
|00004160| 44 69 61 67 73 54 65 78 | 74 28 64 69 61 67 73 54 |DiagsTex|t(diagsT|
|00004170| 65 78 74 29 20 69 6e 74 | 6f 20 64 75 6d 6d 79 0d |ext) int|o dummy.|
|00004180| 0d 70 75 74 20 68 61 6e | 64 6c 65 57 61 69 73 45 |.put han|dleWaisE|
|00004190| 72 72 6f 72 28 77 61 69 | 73 45 72 72 6f 72 29 20 |rror(wai|sError) |
|000041a0| 69 6e 74 6f 20 77 61 69 | 73 45 72 72 6f 72 0d 0d |into wai|sError..|
|000041b0| 70 75 74 20 65 6d 70 74 | 79 20 69 6e 74 6f 20 62 |put empt|y into b|
|000041c0| 61 63 6b 67 72 6f 75 6e | 64 20 66 69 65 6c 64 20 |ackgroun|d field |
|000041d0| 22 73 74 61 74 75 73 5f | 6c 69 6e 65 22 0d 0d 65 |"status_|line"..e|
|000041e0| 6e 64 20 69 66 0d 0d 72 | 65 74 75 72 6e 20 77 61 |nd if..r|eturn wa|
|000041f0| 69 73 45 72 72 6f 72 0d | 0d 65 6e 64 20 47 65 74 |isError.|.end Get|
|00004200| 44 6f 63 54 6f 46 69 6c | 65 42 79 49 44 0d 0d 0d |DocToFil|eByID...|
|00004210| 66 75 6e 63 74 69 6f 6e | 20 52 65 6c 46 65 65 64 |function| RelFeed|
|00004220| 62 61 63 6b 41 64 64 20 | 72 65 73 75 6c 74 44 6f |backAdd |resultDo|
|00004230| 63 4e 75 6d 2c 20 72 65 | 73 75 6c 74 43 68 75 6e |cNum, re|sultChun|
|00004240| 6b 54 79 70 65 2c 20 72 | 65 73 75 6c 74 44 6f 63 |kType, r|esultDoc|
|00004250| 53 74 61 72 74 2c 20 c2 | 0d 72 65 73 75 6c 74 44 |Start, .|.resultD|
|00004260| 6f 63 45 6e 64 0d 2d 2d | 20 61 64 64 73 20 61 20 |ocEnd.--| adds a |
|00004270| 64 6f 63 75 6d 65 6e 74 | 20 63 68 75 6e 6b 20 74 |document| chunk t|
|00004280| 6f 20 74 68 65 20 72 65 | 6c 65 76 61 6e 63 65 20 |o the re|levance |
|00004290| 66 65 65 64 62 61 63 6b | 20 61 72 72 61 79 20 66 |feedback| array f|
|000042a0| 72 6f 6d 20 74 68 65 0d | 2d 2d 20 72 65 73 75 6c |rom the.|-- resul|
|000042b0| 74 44 6f 63 53 74 61 72 | 74 20 74 6f 20 74 68 65 |tDocStar|t to the|
|000042c0| 20 72 65 73 75 6c 74 44 | 6f 63 45 6e 64 20 77 69 | resultD|ocEnd wi|
|000042d0| 74 68 20 72 65 73 70 65 | 63 74 20 74 6f 20 72 65 |th respe|ct to re|
|000042e0| 73 75 6c 74 43 68 75 6e | 6b 54 79 70 65 0d 2d 2d |sultChun|kType.--|
|000042f0| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 20 63 68 | the doc|ument ch|
|00004300| 75 6e 6b 20 61 64 64 65 | 64 20 63 6f 72 72 65 73 |unk adde|d corres|
|00004310| 70 6f 6e 64 73 20 74 6f | 20 74 68 65 20 72 65 73 |ponds to| the res|
|00004320| 75 6c 74 44 6f 63 4e 75 | 6d 20 70 61 73 73 65 64 |ultDocNu|m passed|
|00004330| 0d 2d 2d 20 28 6e 6f 74 | 65 20 74 68 61 74 20 74 |.-- (not|e that t|
|00004340| 68 65 20 64 6f 63 75 6d | 65 6e 74 20 6e 75 6d 62 |he docum|ent numb|
|00004350| 65 72 69 6e 67 20 73 74 | 61 72 74 73 20 61 74 20 |ering st|arts at |
|00004360| 7a 65 72 6f 20 72 61 74 | 68 65 72 20 74 68 61 6e |zero rat|her than|
|00004370| 20 31 29 0d 2d 2d 20 61 | 20 72 65 6c 65 76 61 6e | 1).-- a| relevan|
|00004380| 63 65 20 66 65 65 64 62 | 61 63 6b 20 65 6e 74 72 |ce feedb|ack entr|
|00004390| 79 20 6e 75 6d 62 65 72 | 20 67 6c 6f 62 61 6c 20 |y number| global |
|000043a0| 69 73 20 73 65 74 20 74 | 6f 20 61 6c 6c 6f 77 20 |is set t|o allow |
|000043b0| 48 43 20 74 6f 20 74 72 | 61 63 6b 0d 2d 2d 20 74 |HC to tr|ack.-- t|
|000043c0| 68 65 20 65 6e 74 72 69 | 65 73 20 69 6e 20 74 68 |he entri|es in th|
|000043d0| 65 20 61 72 72 61 79 20 | 28 74 68 65 20 65 6e 74 |e array |(the ent|
|000043e0| 72 79 20 6e 75 6d 62 65 | 72 69 6e 67 20 73 74 61 |ry numbe|ring sta|
|000043f0| 72 74 73 20 61 74 20 7a | 65 72 6f 29 0d 2d 2d 20 |rts at z|ero).-- |
|00004400| 72 65 74 75 72 6e 20 65 | 72 72 6f 72 20 6e 75 6d |return e|rror num|
|00004410| 62 65 72 20 28 20 30 20 | 2d 20 6e 6f 20 65 72 72 |ber ( 0 |- no err|
|00004420| 6f 72 20 29 0d 0d 67 6c | 6f 62 61 6c 20 67 57 61 |or )..gl|obal gWa|
|00004430| 69 73 41 64 64 72 65 73 | 73 0d 67 6c 6f 62 61 6c |isAddres|s.global|
|00004440| 20 44 45 42 55 47 0d 0d | 2d 2d 20 72 65 6c 65 76 | DEBUG..|-- relev|
|00004450| 61 6e 63 65 20 66 65 65 | 64 62 61 63 6b 20 65 6e |ance fee|dback en|
|00004460| 74 72 79 20 6e 75 6d 62 | 65 72 0d 67 6c 6f 62 61 |try numb|er.globa|
|00004470| 6c 20 72 65 6c 45 6e 74 | 72 79 4e 75 6d 0d 0d 70 |l relEnt|ryNum..p|
|00004480| 75 74 20 30 20 69 6e 74 | 6f 20 77 61 69 73 45 72 |ut 0 int|o waisEr|
|00004490| 72 6f 72 0d 0d 2d 2d 20 | 72 65 73 65 74 20 74 68 |ror..-- |reset th|
|000044a0| 65 20 72 65 6c 65 76 61 | 6e 63 65 20 66 65 65 64 |e releva|nce feed|
|000044b0| 62 61 63 6b 20 65 6e 74 | 72 79 20 6e 75 6d 62 65 |back ent|ry numbe|
|000044c0| 72 0d 70 75 74 20 65 6d | 70 74 79 20 69 6e 74 6f |r.put em|pty into|
|000044d0| 20 65 6e 74 72 79 4e 75 | 6d 0d 0d 2d 2d 20 61 64 | entryNu|m..-- ad|
|000044e0| 64 20 61 6e 20 65 6e 74 | 72 79 20 74 6f 20 74 68 |d an ent|ry to th|
|000044f0| 65 20 72 65 6c 65 76 61 | 6e 63 65 20 66 65 65 64 |e releva|nce feed|
|00004500| 62 61 63 6b 20 61 72 72 | 61 79 0d 69 66 20 63 6f |back arr|ay.if co|
|00004510| 6e 6e 65 63 74 65 64 28 | 29 20 3d 20 31 20 74 68 |nnected(|) = 1 th|
|00004520| 65 6e 0d 70 75 74 20 22 | 41 64 64 69 6e 67 20 72 |en.put "|Adding r|
|00004530| 65 6c 65 76 61 6e 63 65 | 20 66 65 65 64 62 61 63 |elevance| feedbac|
|00004540| 6b 20 65 6e 74 72 79 22 | 20 69 6e 74 6f 20 62 61 |k entry"| into ba|
|00004550| 63 6b 67 72 6f 75 6e 64 | 20 66 69 65 6c 64 20 22 |ckground| field "|
|00004560| 73 74 61 74 75 73 5f 6c | 69 6e 65 22 0d 0d 70 75 |status_l|ine"..pu|
|00004570| 74 20 48 43 52 65 6c 46 | 65 65 64 62 61 63 6b 41 |t HCRelF|eedbackA|
|00004580| 64 64 28 67 57 61 69 73 | 41 64 64 72 65 73 73 2c |dd(gWais|Address,|
|00004590| 20 72 65 73 75 6c 74 44 | 6f 63 4e 75 6d 2c 20 c2 | resultD|ocNum, .|
|000045a0| 0d 72 65 73 75 6c 74 43 | 68 75 6e 6b 54 79 70 65 |.resultC|hunkType|
|000045b0| 2c 20 72 65 73 75 6c 74 | 44 6f 63 53 74 61 72 74 |, result|DocStart|
|000045c0| 2c 20 72 65 73 75 6c 74 | 44 6f 63 45 6e 64 29 20 |, result|DocEnd) |
|000045d0| 69 6e 74 6f 20 77 61 69 | 73 45 72 72 6f 72 0d 0d |into wai|sError..|
|000045e0| 69 66 20 44 45 42 55 47 | 20 3d 20 31 20 74 68 65 |if DEBUG| = 1 the|
|000045f0| 6e 0d 70 75 74 20 22 48 | 43 52 65 6c 46 65 65 64 |n.put "H|CRelFeed|
|00004600| 62 61 63 6b 41 64 64 20 | 28 22 26 72 65 73 75 6c |backAdd |("&resul|
|00004610| 74 44 6f 63 4e 75 6d 26 | 22 2c 22 26 72 65 73 75 |tDocNum&|","&resu|
|00004620| 6c 74 43 68 75 6e 6b 54 | 79 70 65 c2 0d 26 22 2c |ltChunkT|ype..&",|
|00004630| 22 26 72 65 73 75 6c 74 | 44 6f 63 53 74 61 72 74 |"&result|DocStart|
|00004640| 26 22 2c 22 26 72 65 73 | 75 6c 74 44 6f 63 45 6e |&","&res|ultDocEn|
|00004650| 64 26 22 29 20 5b 22 26 | 77 61 69 73 45 72 72 6f |d&") ["&|waisErro|
|00004660| 72 26 22 5d 22 20 c2 0d | 69 6e 74 6f 20 6d 65 73 |r&"]" ..|into mes|
|00004670| 73 61 67 65 20 62 6f 78 | 0d 65 6e 64 20 69 66 0d |sage box|.end if.|
|00004680| 0d 70 75 74 20 68 61 6e | 64 6c 65 57 61 69 73 45 |.put han|dleWaisE|
|00004690| 72 72 6f 72 28 77 61 69 | 73 45 72 72 6f 72 29 20 |rror(wai|sError) |
|000046a0| 69 6e 74 6f 20 77 61 69 | 73 45 72 72 6f 72 0d 0d |into wai|sError..|
|000046b0| 70 75 74 20 65 6d 70 74 | 79 20 69 6e 74 6f 20 62 |put empt|y into b|
|000046c0| 61 63 6b 67 72 6f 75 6e | 64 20 66 69 65 6c 64 20 |ackgroun|d field |
|000046d0| 22 73 74 61 74 75 73 5f | 6c 69 6e 65 22 0d 0d 65 |"status_|line"..e|
|000046e0| 6e 64 20 69 66 0d 0d 72 | 65 74 75 72 6e 20 77 61 |nd if..r|eturn wa|
|000046f0| 69 73 45 72 72 6f 72 0d | 0d 65 6e 64 20 52 65 6c |isError.|.end Rel|
|00004700| 46 65 65 64 62 61 63 6b | 41 64 64 0d 0d 0d 66 75 |Feedback|Add...fu|
|00004710| 6e 63 74 69 6f 6e 20 52 | 65 6c 46 65 65 64 62 61 |nction R|elFeedba|
|00004720| 63 6b 44 65 6c 20 72 65 | 6c 45 6e 74 72 79 4e 75 |ckDel re|lEntryNu|
|00004730| 6d 0d 2d 2d 20 72 65 6d | 6f 76 65 73 20 74 68 65 |m.-- rem|oves the|
|00004740| 20 65 6e 74 72 79 20 66 | 72 6f 6d 20 74 68 65 20 | entry f|rom the |
|00004750| 72 65 6c 65 76 61 6e 63 | 65 20 66 65 65 64 62 61 |relevanc|e feedba|
|00004760| 63 6b 20 61 72 72 61 79 | 20 63 6f 72 72 65 73 70 |ck array| corresp|
|00004770| 6f 6e 64 69 6e 67 0d 2d | 2d 20 74 6f 20 74 68 65 |onding.-|- to the|
|00004780| 20 72 65 6c 45 6e 74 72 | 79 4e 75 6d 20 70 61 73 | relEntr|yNum pas|
|00004790| 73 65 64 20 28 74 68 65 | 20 65 6e 74 72 79 20 6e |sed (the| entry n|
|000047a0| 75 6d 62 65 72 69 6e 67 | 20 73 74 61 72 74 73 20 |umbering| starts |
|000047b0| 61 74 20 7a 65 72 6f 29 | 0d 2d 2d 20 72 65 74 75 |at zero)|.-- retu|
|000047c0| 72 6e 20 65 72 72 6f 72 | 20 6e 75 6d 62 65 72 20 |rn error| number |
|000047d0| 28 20 30 20 2d 20 6e 6f | 20 65 72 72 6f 72 20 29 |( 0 - no| error )|
|000047e0| 0d 0d 67 6c 6f 62 61 6c | 20 67 57 61 69 73 41 64 |..global| gWaisAd|
|000047f0| 64 72 65 73 73 0d 67 6c | 6f 62 61 6c 20 44 45 42 |dress.gl|obal DEB|
|00004800| 55 47 0d 0d 70 75 74 20 | 30 20 69 6e 74 6f 20 77 |UG..put |0 into w|
|00004810| 61 69 73 45 72 72 6f 72 | 0d 0d 2d 2d 20 64 65 6c |aisError|..-- del|
|00004820| 65 74 65 20 61 6e 20 65 | 6e 74 72 79 20 66 72 6f |ete an e|ntry fro|
|00004830| 6d 20 74 68 65 20 72 65 | 6c 65 76 61 6e 63 65 20 |m the re|levance |
|00004840| 66 65 65 64 62 61 63 6b | 20 61 72 72 61 79 0d 69 |feedback| array.i|
|00004850| 66 20 63 6f 6e 6e 65 63 | 74 65 64 28 29 20 3d 20 |f connec|ted() = |
|00004860| 31 20 74 68 65 6e 0d 70 | 75 74 20 22 44 65 6c 65 |1 then.p|ut "Dele|
|00004870| 74 69 6e 67 20 72 65 6c | 65 76 61 6e 63 65 20 66 |ting rel|evance f|
|00004880| 65 65 64 62 61 63 6b 20 | 65 6e 74 72 79 22 20 69 |eedback |entry" i|
|00004890| 6e 74 6f 20 62 61 63 6b | 67 72 6f 75 6e 64 20 66 |nto back|ground f|
|000048a0| 69 65 6c 64 20 22 73 74 | 61 74 75 73 5f 6c 69 6e |ield "st|atus_lin|
|000048b0| 65 22 0d 0d 70 75 74 20 | 48 43 52 65 6c 46 65 65 |e"..put |HCRelFee|
|000048c0| 64 62 61 63 6b 44 65 6c | 28 67 57 61 69 73 41 64 |dbackDel|(gWaisAd|
|000048d0| 64 72 65 73 73 2c 20 72 | 65 6c 45 6e 74 72 79 4e |dress, r|elEntryN|
|000048e0| 75 6d 29 20 69 6e 74 6f | 20 77 61 69 73 45 72 72 |um) into| waisErr|
|000048f0| 6f 72 0d 0d 69 66 20 44 | 45 42 55 47 20 3d 20 31 |or..if D|EBUG = 1|
|00004900| 20 74 68 65 6e 0d 70 75 | 74 20 22 48 43 52 65 6c | then.pu|t "HCRel|
|00004910| 46 65 65 64 62 61 63 6b | 44 65 6c 20 28 22 26 72 |Feedback|Del ("&r|
|00004920| 65 6c 45 6e 74 72 79 4e | 75 6d 26 22 29 20 5b 22 |elEntryN|um&") ["|
|00004930| 26 77 61 69 73 45 72 72 | 6f 72 26 22 5d 22 20 c2 |&waisErr|or&"]" .|
|00004940| 0d 69 6e 74 6f 20 6d 65 | 73 73 61 67 65 20 62 6f |.into me|ssage bo|
|00004950| 78 0d 65 6e 64 20 69 66 | 0d 0d 70 75 74 20 68 61 |x.end if|..put ha|
|00004960| 6e 64 6c 65 57 61 69 73 | 45 72 72 6f 72 28 77 61 |ndleWais|Error(wa|
|00004970| 69 73 45 72 72 6f 72 29 | 20 69 6e 74 6f 20 77 61 |isError)| into wa|
|00004980| 69 73 45 72 72 6f 72 0d | 0d 70 75 74 20 65 6d 70 |isError.|.put emp|
|00004990| 74 79 20 69 6e 74 6f 20 | 62 61 63 6b 67 72 6f 75 |ty into |backgrou|
|000049a0| 6e 64 20 66 69 65 6c 64 | 20 22 73 74 61 74 75 73 |nd field| "status|
|000049b0| 5f 6c 69 6e 65 22 0d 0d | 65 6e 64 20 69 66 0d 0d |_line"..|end if..|
|000049c0| 72 65 74 75 72 6e 20 77 | 61 69 73 45 72 72 6f 72 |return w|aisError|
|000049d0| 0d 0d 65 6e 64 20 52 65 | 6c 46 65 65 64 62 61 63 |..end Re|lFeedbac|
|000049e0| 6b 44 65 6c 0d 0d 0d 66 | 75 6e 63 74 69 6f 6e 20 |kDel...f|unction |
|000049f0| 52 65 6c 46 65 65 64 62 | 61 63 6b 43 6c 65 61 72 |RelFeedb|ackClear|
|00004a00| 0d 2d 2d 20 63 6c 65 61 | 72 73 20 6f 75 74 20 61 |.-- clea|rs out a|
|00004a10| 6c 6c 20 74 68 65 20 72 | 65 6c 65 76 61 6e 63 65 |ll the r|elevance|
|00004a20| 20 66 65 65 64 62 61 63 | 6b 20 65 6e 74 72 69 65 | feedbac|k entrie|
|00004a30| 73 20 66 72 6f 6d 20 74 | 68 65 20 61 72 72 61 79 |s from t|he array|
|00004a40| 0d 2d 2d 20 72 65 74 75 | 72 6e 20 65 72 72 6f 72 |.-- retu|rn error|
|00004a50| 20 6e 75 6d 62 65 72 20 | 28 20 30 20 2d 20 6e 6f | number |( 0 - no|
|00004a60| 20 65 72 72 6f 72 20 29 | 0d 0d 67 6c 6f 62 61 6c | error )|..global|
|00004a70| 20 67 57 61 69 73 41 64 | 64 72 65 73 73 0d 67 6c | gWaisAd|dress.gl|
|00004a80| 6f 62 61 6c 20 44 45 42 | 55 47 0d 0d 70 75 74 20 |obal DEB|UG..put |
|00004a90| 30 20 69 6e 74 6f 20 77 | 61 69 73 45 72 72 6f 72 |0 into w|aisError|
|00004aa0| 0d 0d 2d 2d 20 64 65 6c | 65 74 65 20 61 6e 20 65 |..-- del|ete an e|
|00004ab0| 6e 74 72 79 20 66 72 6f | 6d 20 74 68 65 20 72 65 |ntry fro|m the re|
|00004ac0| 6c 65 76 61 6e 63 65 20 | 66 65 65 64 62 61 63 6b |levance |feedback|
|00004ad0| 20 61 72 72 61 79 0d 69 | 66 20 63 6f 6e 6e 65 63 | array.i|f connec|
|00004ae0| 74 65 64 28 29 20 3d 20 | 31 20 74 68 65 6e 0d 70 |ted() = |1 then.p|
|00004af0| 75 74 20 22 43 6c 65 61 | 72 69 6e 67 20 72 65 6c |ut "Clea|ring rel|
|00004b00| 65 76 61 6e 63 65 20 66 | 65 65 64 62 61 63 6b 20 |evance f|eedback |
|00004b10| 65 6e 74 72 79 22 20 69 | 6e 74 6f 20 62 61 63 6b |entry" i|nto back|
|00004b20| 67 72 6f 75 6e 64 20 66 | 69 65 6c 64 20 22 73 74 |ground f|ield "st|
|00004b30| 61 74 75 73 5f 6c 69 6e | 65 22 0d 0d 70 75 74 20 |atus_lin|e"..put |
|00004b40| 48 43 52 65 6c 46 65 65 | 64 62 61 63 6b 43 6c 65 |HCRelFee|dbackCle|
|00004b50| 61 72 28 67 57 61 69 73 | 41 64 64 72 65 73 73 29 |ar(gWais|Address)|
|00004b60| 20 69 6e 74 6f 20 77 61 | 69 73 45 72 72 6f 72 0d | into wa|isError.|
|00004b70| 0d 69 66 20 44 45 42 55 | 47 20 3d 20 31 20 74 68 |.if DEBU|G = 1 th|
|00004b80| 65 6e 0d 70 75 74 20 22 | 52 65 6c 46 65 65 64 62 |en.put "|RelFeedb|
|00004b90| 61 63 6b 43 6c 65 61 72 | 20 5b 22 26 77 61 69 73 |ackClear| ["&wais|
|00004ba0| 45 72 72 6f 72 26 22 5d | 22 20 69 6e 74 6f 20 6d |Error&"]|" into m|
|00004bb0| 65 73 73 61 67 65 20 62 | 6f 78 0d 65 6e 64 20 69 |essage b|ox.end i|
|00004bc0| 66 0d 0d 70 75 74 20 68 | 61 6e 64 6c 65 57 61 69 |f..put h|andleWai|
|00004bd0| 73 45 72 72 6f 72 28 77 | 61 69 73 45 72 72 6f 72 |sError(w|aisError|
|00004be0| 29 20 69 6e 74 6f 20 77 | 61 69 73 45 72 72 6f 72 |) into w|aisError|
|00004bf0| 0d 0d 70 75 74 20 65 6d | 70 74 79 20 69 6e 74 6f |..put em|pty into|
|00004c00| 20 62 61 63 6b 67 72 6f | 75 6e 64 20 66 69 65 6c | backgro|und fiel|
|00004c10| 64 20 22 73 74 61 74 75 | 73 5f 6c 69 6e 65 22 0d |d "statu|s_line".|
|00004c20| 0d 65 6e 64 20 69 66 0d | 0d 72 65 74 75 72 6e 20 |.end if.|.return |
|00004c30| 77 61 69 73 45 72 72 6f | 72 0d 0d 65 6e 64 20 52 |waisErro|r..end R|
|00004c40| 65 6c 46 65 65 64 62 61 | 63 6b 43 6c 65 61 72 0d |elFeedba|ckClear.|
|00004c50| 0d 0d 66 75 6e 63 74 69 | 6f 6e 20 57 61 69 73 52 |..functi|on WaisR|
|00004c60| 65 73 65 74 53 65 73 73 | 69 6f 6e 0d 2d 2d 20 72 |esetSess|ion.-- r|
|00004c70| 65 73 65 74 20 74 68 65 | 20 73 65 73 73 69 6f 6e |eset the| session|
|00004c80| 2c 20 63 6c 6f 73 65 73 | 20 61 6c 6c 20 63 6f 6e |, closes| all con|
|00004c90| 6e 65 63 74 69 6f 6e 73 | 2c 20 63 6c 65 61 72 73 |nections|, clears|
|00004ca0| 20 6f 75 74 20 64 6f 63 | 75 6d 65 6e 74 20 72 65 | out doc|ument re|
|00004cb0| 73 75 6c 74 20 73 65 74 | 20 61 6e 64 0d 2d 2d 20 |sult set| and.-- |
|00004cc0| 74 68 65 20 72 65 6c 65 | 76 61 6e 63 65 20 66 65 |the rele|vance fe|
|00004cd0| 65 64 62 61 63 6b 20 61 | 72 72 61 79 0d 2d 2d 20 |edback a|rray.-- |
|00004ce0| 72 65 74 75 72 6e 20 65 | 72 72 6f 72 20 6e 75 6d |return e|rror num|
|00004cf0| 62 65 72 20 28 20 30 20 | 2d 20 6e 6f 20 65 72 72 |ber ( 0 |- no err|
|00004d00| 6f 72 20 29 0d 0d 67 6c | 6f 62 61 6c 20 67 57 61 |or )..gl|obal gWa|
|00004d10| 69 73 41 64 64 72 65 73 | 73 0d 67 6c 6f 62 61 6c |isAddres|s.global|
|00004d20| 20 44 45 42 55 47 0d 0d | 70 75 74 20 30 20 69 6e | DEBUG..|put 0 in|
|00004d30| 74 6f 20 77 61 69 73 45 | 72 72 6f 72 0d 0d 2d 2d |to waisE|rror..--|
|00004d40| 20 72 65 73 65 74 20 74 | 68 65 20 77 61 69 73 2d | reset t|he wais-|
|00004d50| 6c 69 73 74 65 6e 65 72 | 0d 69 66 20 63 6f 6e 6e |listener|.if conn|
|00004d60| 65 63 74 65 64 28 29 20 | 3d 20 31 20 74 68 65 6e |ected() |= 1 then|
|00004d70| 0d 70 75 74 20 22 52 65 | 73 65 74 69 6e 67 20 73 |.put "Re|seting s|
|00004d80| 65 73 73 69 6f 6e 22 20 | 69 6e 74 6f 20 62 61 63 |ession" |into bac|
|00004d90| 6b 67 72 6f 75 6e 64 20 | 66 69 65 6c 64 20 22 73 |kground |field "s|
|00004da0| 74 61 74 75 73 5f 6c 69 | 6e 65 22 0d 0d 70 75 74 |tatus_li|ne"..put|
|00004db0| 20 48 43 57 61 69 73 52 | 65 73 65 74 53 65 73 73 | HCWaisR|esetSess|
|00004dc0| 69 6f 6e 28 67 57 61 69 | 73 41 64 64 72 65 73 73 |ion(gWai|sAddress|
|00004dd0| 29 20 69 6e 74 6f 20 77 | 61 69 73 45 72 72 6f 72 |) into w|aisError|
|00004de0| 0d 0d 69 66 20 44 45 42 | 55 47 20 3d 20 31 20 74 |..if DEB|UG = 1 t|
|00004df0| 68 65 6e 0d 70 75 74 20 | 22 57 61 69 73 52 65 73 |hen.put |"WaisRes|
|00004e00| 65 74 53 65 73 73 69 6f | 6e 20 5b 22 26 77 61 69 |etSessio|n ["&wai|
|00004e10| 73 45 72 72 6f 72 26 22 | 5d 22 20 69 6e 74 6f 20 |sError&"|]" into |
|00004e20| 6d 65 73 73 61 67 65 20 | 62 6f 78 0d 65 6e 64 20 |message |box.end |
|00004e30| 69 66 0d 0d 2d 2d 20 68 | 61 6e 64 6c 65 20 61 6e |if..-- h|andle an|
|00004e40| 79 20 65 72 72 6f 72 73 | 0d 70 75 74 20 68 61 6e |y errors|.put han|
|00004e50| 64 6c 65 57 61 69 73 45 | 72 72 6f 72 28 77 61 69 |dleWaisE|rror(wai|
|00004e60| 73 45 72 72 6f 72 29 20 | 69 6e 74 6f 20 77 61 69 |sError) |into wai|
|00004e70| 73 45 72 72 6f 72 0d 0d | 70 75 74 20 65 6d 70 74 |sError..|put empt|
|00004e80| 79 20 69 6e 74 6f 20 62 | 61 63 6b 67 72 6f 75 6e |y into b|ackgroun|
|00004e90| 64 20 66 69 65 6c 64 20 | 22 73 74 61 74 75 73 5f |d field |"status_|
|00004ea0| 6c 69 6e 65 22 0d 0d 65 | 6e 64 20 69 66 0d 0d 72 |line"..e|nd if..r|
|00004eb0| 65 74 75 72 6e 20 77 61 | 69 73 45 72 72 6f 72 0d |eturn wa|isError.|
|00004ec0| 0d 65 6e 64 20 57 61 69 | 73 52 65 73 65 74 53 65 |.end Wai|sResetSe|
|00004ed0| 73 73 69 6f 6e 0d 0d 0d | 0d 66 75 6e 63 74 69 6f |ssion...|.functio|
|00004ee0| 6e 20 4b 69 6c 6c 57 61 | 69 73 4c 69 73 74 65 6e |n KillWa|isListen|
|00004ef0| 65 72 0d 2d 2d 20 74 65 | 72 6d 69 6e 61 74 65 73 |er.-- te|rminates|
|00004f00| 20 74 68 65 20 77 61 69 | 73 2d 6c 69 73 74 65 6e | the wai|s-listen|
|00004f10| 65 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 0d 2d |er appli|cation.-|
|00004f20| 2d 20 72 65 74 75 72 6e | 20 65 72 72 6f 72 20 6e |- return| error n|
|00004f30| 75 6d 62 65 72 20 28 20 | 30 20 2d 20 6e 6f 20 65 |umber ( |0 - no e|
|00004f40| 72 72 6f 72 20 29 0d 0d | 67 6c 6f 62 61 6c 20 67 |rror )..|global g|
|00004f50| 57 61 69 73 41 64 64 72 | 65 73 73 0d 67 6c 6f 62 |WaisAddr|ess.glob|
|00004f60| 61 6c 20 44 45 42 55 47 | 0d 0d 70 75 74 20 30 20 |al DEBUG|..put 0 |
|00004f70| 69 6e 74 6f 20 77 61 69 | 73 45 72 72 6f 72 0d 0d |into wai|sError..|
|00004f80| 2d 2d 20 74 65 72 6d 69 | 6e 61 74 65 20 74 68 65 |-- termi|nate the|
|00004f90| 20 77 61 69 73 2d 6c 69 | 73 74 65 6e 65 72 0d 69 | wais-li|stener.i|
|00004fa0| 66 20 63 6f 6e 6e 65 63 | 74 65 64 28 29 20 3d 20 |f connec|ted() = |
|00004fb0| 31 20 74 68 65 6e 0d 70 | 75 74 20 22 51 75 69 74 |1 then.p|ut "Quit|
|00004fc0| 69 6e 67 20 57 61 69 73 | 20 4c 69 73 74 65 6e 65 |ing Wais| Listene|
|00004fd0| 72 22 20 69 6e 74 6f 20 | 62 61 63 6b 67 72 6f 75 |r" into |backgrou|
|00004fe0| 6e 64 20 66 69 65 6c 64 | 20 22 73 74 61 74 75 73 |nd field| "status|
|00004ff0| 5f 6c 69 6e 65 22 0d 0d | 70 75 74 20 48 43 4b 69 |_line"..|put HCKi|
|00005000| 6c 6c 57 61 69 73 4c 69 | 73 74 65 6e 65 72 28 67 |llWaisLi|stener(g|
|00005010| 57 61 69 73 41 64 64 72 | 65 73 73 29 20 69 6e 74 |WaisAddr|ess) int|
|00005020| 6f 20 77 61 69 73 45 72 | 72 6f 72 0d 0d 69 66 20 |o waisEr|ror..if |
|00005030| 44 45 42 55 47 20 3d 20 | 31 20 74 68 65 6e 0d 70 |DEBUG = |1 then.p|
|00005040| 75 74 20 22 4b 69 6c 6c | 57 61 69 73 4c 69 73 74 |ut "Kill|WaisList|
|00005050| 65 6e 65 72 20 5b 22 26 | 77 61 69 73 45 72 72 6f |ener ["&|waisErro|
|00005060| 72 26 22 5d 22 20 69 6e | 74 6f 20 6d 65 73 73 61 |r&"]" in|to messa|
|00005070| 67 65 20 62 6f 78 0d 65 | 6e 64 20 69 66 0d 0d 2d |ge box.e|nd if..-|
|00005080| 2d 20 68 61 6e 64 6c 65 | 20 61 6e 79 20 65 72 72 |- handle| any err|
|00005090| 6f 72 73 0d 70 75 74 20 | 68 61 6e 64 6c 65 57 61 |ors.put |handleWa|
|000050a0| 69 73 45 72 72 6f 72 28 | 77 61 69 73 45 72 72 6f |isError(|waisErro|
|000050b0| 72 29 20 69 6e 74 6f 20 | 77 61 69 73 45 72 72 6f |r) into |waisErro|
|000050c0| 72 0d 0d 70 75 74 20 65 | 6d 70 74 79 20 69 6e 74 |r..put e|mpty int|
|000050d0| 6f 20 62 61 63 6b 67 72 | 6f 75 6e 64 20 66 69 65 |o backgr|ound fie|
|000050e0| 6c 64 20 22 73 74 61 74 | 75 73 5f 6c 69 6e 65 22 |ld "stat|us_line"|
|000050f0| 0d 0d 65 6e 64 20 69 66 | 0d 0d 72 65 74 75 72 6e |..end if|..return|
|00005100| 20 77 61 69 73 45 72 72 | 6f 72 0d 0d 65 6e 64 20 | waisErr|or..end |
|00005110| 4b 69 6c 6c 57 61 69 73 | 4c 69 73 74 65 6e 65 72 |KillWais|Listener|
|00005120| 0d 0d 0d 66 75 6e 63 74 | 69 6f 6e 20 4d 61 63 55 |...funct|ion MacU|
|00005130| 6e 42 69 6e 20 73 72 63 | 46 69 6c 65 4e 61 6d 65 |nBin src|FileName|
|00005140| 2c 20 20 64 65 73 74 46 | 69 6c 65 4e 61 6d 65 2c |, destF|ileName,|
|00005150| 20 64 65 73 74 46 69 6c | 65 43 72 65 61 74 6f 72 | destFil|eCreator|
|00005160| 2c 20 c2 0d 64 65 73 74 | 46 69 6c 65 54 79 70 65 |, ..dest|FileType|
|00005170| 0d 2d 2d 20 63 6f 6e 76 | 65 72 74 73 20 61 20 66 |.-- conv|erts a f|
|00005180| 69 6c 65 20 66 72 6f 6d | 20 4d 61 63 42 69 6e 61 |ile from| MacBina|
|00005190| 72 79 20 66 6f 72 6d 61 | 74 20 74 6f 20 72 65 73 |ry forma|t to res|
|000051a0| 6f 75 72 63 65 2f 64 61 | 74 61 20 66 6f 72 6b 20 |ource/da|ta fork |
|000051b0| 66 6f 72 6d 61 74 0d 2d | 2d 20 61 20 73 72 63 46 |format.-|- a srcF|
|000051c0| 69 6c 65 4e 61 6d 65 20 | 6d 75 73 74 20 62 65 20 |ileName |must be |
|000051d0| 73 70 65 63 69 66 69 65 | 64 2c 20 75 6e 6c 65 73 |specifie|d, unles|
|000051e0| 73 20 74 68 65 20 6f 74 | 68 65 72 20 74 68 72 65 |s the ot|her thre|
|000051f0| 65 20 70 61 72 61 6d 65 | 74 65 72 73 0d 2d 2d 20 |e parame|ters.-- |
|00005200| 61 72 65 20 73 70 65 63 | 69 66 69 65 64 2c 20 74 |are spec|ified, t|
|00005210| 68 65 20 58 46 43 4e 20 | 77 69 6c 6c 20 67 65 74 |he XFCN |will get|
|00005220| 20 74 68 65 6d 20 66 72 | 6f 6d 20 74 68 65 20 4d | them fr|om the M|
|00005230| 61 63 42 69 6e 61 72 79 | 20 66 69 6c 65 0d 2d 2d |acBinary| file.--|
|00005240| 20 72 65 74 75 72 6e 20 | 65 72 72 6f 72 20 6e 75 | return |error nu|
|00005250| 6d 62 65 72 20 28 20 30 | 20 2d 20 6e 6f 20 65 72 |mber ( 0| - no er|
|00005260| 72 6f 72 20 29 0d 0d 67 | 6c 6f 62 61 6c 20 44 45 |ror )..g|lobal DE|
|00005270| 42 55 47 0d 0d 2d 2d 20 | 20 72 65 73 65 74 20 6f |BUG..-- | reset o|
|00005280| 75 72 20 77 61 69 73 45 | 72 72 6f 72 0d 70 75 74 |ur waisE|rror.put|
|00005290| 20 30 20 69 6e 74 6f 20 | 77 61 69 73 45 72 72 6f | 0 into |waisErro|
|000052a0| 72 0d 0d 70 75 74 20 22 | 43 6f 6e 76 65 72 74 69 |r..put "|Converti|
|000052b0| 6e 67 20 66 69 6c 65 20 | 66 72 6f 6d 20 4d 61 63 |ng file |from Mac|
|000052c0| 42 69 6e 61 72 79 20 66 | 6f 72 6d 61 74 22 20 69 |Binary f|ormat" i|
|000052d0| 6e 74 6f 20 62 61 63 6b | 67 72 6f 75 6e 64 20 66 |nto back|ground f|
|000052e0| 69 65 6c 64 20 22 73 74 | 61 74 75 73 5f 6c 69 6e |ield "st|atus_lin|
|000052f0| 65 22 0d 0d 2d 2d 20 55 | 6e 62 69 6e 69 66 79 20 |e"..-- U|nbinify |
|00005300| 6f 75 72 20 66 69 6c 65 | 0d 70 75 74 20 48 43 4d |our file|.put HCM|
|00005310| 61 63 55 6e 42 69 6e 28 | 73 72 63 46 69 6c 65 4e |acUnBin(|srcFileN|
|00005320| 61 6d 65 2c 20 20 64 65 | 73 74 46 69 6c 65 4e 61 |ame, de|stFileNa|
|00005330| 6d 65 2c 20 64 65 73 74 | 46 69 6c 65 43 72 65 61 |me, dest|FileCrea|
|00005340| 74 6f 72 2c 20 c2 0d 64 | 65 73 74 46 69 6c 65 54 |tor, ..d|estFileT|
|00005350| 79 70 65 29 20 69 6e 74 | 6f 20 77 61 69 73 45 72 |ype) int|o waisEr|
|00005360| 72 6f 72 0d 0d 69 66 20 | 44 45 42 55 47 20 3d 20 |ror..if |DEBUG = |
|00005370| 31 20 74 68 65 6e 0d 70 | 75 74 20 22 48 43 4d 61 |1 then.p|ut "HCMa|
|00005380| 63 55 6e 42 69 6e 20 28 | 22 26 73 72 63 46 69 6c |cUnBin (|"&srcFil|
|00005390| 65 4e 61 6d 65 26 22 2c | 22 26 64 65 73 74 46 69 |eName&",|"&destFi|
|000053a0| 6c 65 4e 61 6d 65 26 22 | 2c 22 26 64 65 73 74 46 |leName&"|,"&destF|
|000053b0| 69 6c 65 43 72 65 61 74 | 6f 72 c2 0d 26 22 2c 22 |ileCreat|or..&","|
|000053c0| 26 64 65 73 74 46 69 6c | 65 54 79 70 65 26 22 29 |&destFil|eType&")|
|000053d0| 20 5b 22 26 77 61 69 73 | 45 72 72 6f 72 26 22 5d | ["&wais|Error&"]|
|000053e0| 22 20 69 6e 74 6f 20 6d | 65 73 73 61 67 65 20 62 |" into m|essage b|
|000053f0| 6f 78 0d 65 6e 64 20 69 | 66 0d 0d 2d 2d 20 68 61 |ox.end i|f..-- ha|
|00005400| 6e 64 6c 65 20 61 6e 79 | 20 65 72 72 6f 72 73 0d |ndle any| errors.|
|00005410| 70 75 74 20 68 61 6e 64 | 6c 65 57 61 69 73 45 72 |put hand|leWaisEr|
|00005420| 72 6f 72 28 77 61 69 73 | 45 72 72 6f 72 29 20 69 |ror(wais|Error) i|
|00005430| 6e 74 6f 20 77 61 69 73 | 45 72 72 6f 72 0d 0d 70 |nto wais|Error..p|
|00005440| 75 74 20 65 6d 70 74 79 | 20 69 6e 74 6f 20 62 61 |ut empty| into ba|
|00005450| 63 6b 67 72 6f 75 6e 64 | 20 66 69 65 6c 64 20 22 |ckground| field "|
|00005460| 73 74 61 74 75 73 5f 6c | 69 6e 65 22 0d 0d 72 65 |status_l|ine"..re|
|00005470| 74 75 72 6e 20 77 61 69 | 73 45 72 72 6f 72 0d 0d |turn wai|sError..|
|00005480| 65 6e 64 20 4d 61 63 55 | 6e 42 69 6e 0d 0d 0d 0d |end MacU|nBin....|
|00005490| 66 75 6e 63 74 69 6f 6e | 20 70 61 72 73 65 4c 69 |function| parseLi|
|000054a0| 6e 65 20 66 69 65 6c 64 | 4c 69 6e 65 2c 20 74 65 |ne field|Line, te|
|000054b0| 78 74 4c 69 6e 65 0d 0d | 2d 2d 20 70 61 72 73 65 |xtLine..|-- parse|
|000054c0| 20 6f 75 74 20 74 68 65 | 20 73 65 63 6f 6e 64 20 | out the| second |
|000054d0| 70 61 72 74 20 6f 66 20 | 74 68 65 20 6c 69 6e 65 |part of |the line|
|000054e0| 0d 2d 2d 20 66 69 72 73 | 74 20 72 65 70 6c 61 63 |.-- firs|t replac|
|000054f0| 65 20 74 68 65 20 74 65 | 78 74 4c 69 6e 65 20 77 |e the te|xtLine w|
|00005500| 69 74 68 20 61 20 6e 75 | 6c 6c 0d 2d 2d 20 74 68 |ith a nu|ll.-- th|
|00005510| 65 6e 20 72 65 70 6c 61 | 63 65 20 74 68 65 20 71 |en repla|ce the q|
|00005520| 75 6f 74 65 73 20 77 69 | 74 68 20 61 20 6e 75 6c |uotes wi|th a nul|
|00005530| 6c 0d 2d 2d 20 74 68 65 | 6e 20 72 65 70 6c 61 63 |l.-- the|n replac|
|00005540| 65 20 74 68 65 20 74 61 | 62 73 20 77 69 74 68 20 |e the ta|bs with |
|00005550| 61 20 6e 75 6c 6c 0d 2d | 2d 20 74 68 65 6e 20 74 |a null.-|- then t|
|00005560| 72 69 6d 20 74 68 65 20 | 62 6c 61 6e 6b 73 0d 0d |rim the |blanks..|
|00005570| 70 75 74 20 72 65 6d 6f | 76 65 54 65 78 74 28 66 |put remo|veText(f|
|00005580| 69 65 6c 64 4c 69 6e 65 | 2c 20 74 65 78 74 4c 69 |ieldLine|, textLi|
|00005590| 6e 65 20 29 20 69 6e 74 | 6f 20 66 69 65 6c 64 4c |ne ) int|o fieldL|
|000055a0| 69 6e 65 0d 70 75 74 20 | 72 65 6d 6f 76 65 54 65 |ine.put |removeTe|
|000055b0| 78 74 28 66 69 65 6c 64 | 4c 69 6e 65 2c 20 71 75 |xt(field|Line, qu|
|000055c0| 6f 74 65 20 29 20 69 6e | 74 6f 20 66 69 65 6c 64 |ote ) in|to field|
|000055d0| 4c 69 6e 65 0d 70 75 74 | 20 72 65 6d 6f 76 65 54 |Line.put| removeT|
|000055e0| 65 78 74 28 66 69 65 6c | 64 4c 69 6e 65 2c 20 74 |ext(fiel|dLine, t|
|000055f0| 61 62 20 29 20 69 6e 74 | 6f 20 66 69 65 6c 64 4c |ab ) int|o fieldL|
|00005600| 69 6e 65 0d 70 75 74 20 | 74 72 69 6d 42 6c 61 6e |ine.put |trimBlan|
|00005610| 6b 73 28 66 69 65 6c 64 | 4c 69 6e 65 29 20 69 6e |ks(field|Line) in|
|00005620| 74 6f 20 66 69 65 6c 64 | 4c 69 6e 65 0d 0d 72 65 |to field|Line..re|
|00005630| 74 75 72 6e 20 66 69 65 | 6c 64 4c 69 6e 65 0d 0d |turn fie|ldLine..|
|00005640| 65 6e 64 20 70 61 72 73 | 65 4c 69 6e 65 0d 0d 0d |end pars|eLine...|
|00005650| 66 75 6e 63 74 69 6f 6e | 20 72 65 6d 6f 76 65 54 |function| removeT|
|00005660| 65 78 74 20 74 65 78 74 | 4c 69 6e 65 2c 20 6f 6c |ext text|Line, ol|
|00005670| 64 54 65 78 74 0d 2d 2d | 20 74 68 69 73 20 66 75 |dText.--| this fu|
|00005680| 6e 63 74 69 6f 6e 20 72 | 65 6d 6f 76 65 73 20 65 |nction r|emoves e|
|00005690| 76 65 72 79 20 6f 63 63 | 75 72 61 6e 63 65 20 6f |very occ|urance o|
|000056a0| 66 20 6f 6c 64 54 65 78 | 74 20 69 6e 0d 2d 2d 20 |f oldTex|t in.-- |
|000056b0| 74 65 78 74 4c 69 6e 65 | 0d 0d 72 65 70 65 61 74 |textLine|..repeat|
|000056c0| 20 75 6e 74 69 6c 20 6f | 6c 64 54 65 78 74 20 69 | until o|ldText i|
|000056d0| 73 20 6e 6f 74 20 69 6e | 20 74 65 78 74 4c 69 6e |s not in| textLin|
|000056e0| 65 0d 70 75 74 20 6f 66 | 66 73 65 74 28 6f 6c 64 |e.put of|fset(old|
|000056f0| 54 65 78 74 2c 74 65 78 | 74 4c 69 6e 65 29 20 69 |Text,tex|tLine) i|
|00005700| 6e 74 6f 20 6f 6c 64 54 | 65 78 74 53 74 61 72 74 |nto oldT|extStart|
|00005710| 0d 70 75 74 20 22 22 20 | 69 6e 74 6f 20 63 68 61 |.put "" |into cha|
|00005720| 72 20 6f 6c 64 54 65 78 | 74 53 74 61 72 74 20 74 |r oldTex|tStart t|
|00005730| 6f 20 6f 6c 64 54 65 78 | 74 53 74 61 72 74 20 2b |o oldTex|tStart +|
|00005740| 20 c2 0d 28 20 74 68 65 | 20 6c 65 6e 67 74 68 20 | ..( the| length |
|00005750| 6f 66 20 6f 6c 64 54 65 | 78 74 20 2d 20 31 20 29 |of oldTe|xt - 1 )|
|00005760| 20 6f 66 20 74 65 78 74 | 4c 69 6e 65 0d 65 6e 64 | of text|Line.end|
|00005770| 20 72 65 70 65 61 74 0d | 0d 72 65 74 75 72 6e 20 | repeat.|.return |
|00005780| 74 65 78 74 4c 69 6e 65 | 0d 0d 65 6e 64 20 72 65 |textLine|..end re|
|00005790| 6d 6f 76 65 54 65 78 74 | 0d 0d 0d 66 75 6e 63 74 |moveText|...funct|
|000057a0| 69 6f 6e 20 74 72 69 6d | 42 6c 61 6e 6b 73 20 74 |ion trim|Blanks t|
|000057b0| 65 78 74 4c 69 6e 65 0d | 2d 2d 20 74 68 69 73 20 |extLine.|-- this |
|000057c0| 66 75 6e 63 74 69 6f 6e | 20 74 72 69 6d 73 20 74 |function| trims t|
|000057d0| 68 65 20 6c 65 61 64 69 | 6e 67 20 61 6e 64 20 74 |he leadi|ng and t|
|000057e0| 72 61 69 6c 69 6e 67 20 | 62 6c 61 6e 6b 73 0d 2d |railing |blanks.-|
|000057f0| 2d 20 69 6e 20 74 65 78 | 74 4c 69 6e 65 0d 0d 2d |- in tex|tLine..-|
|00005800| 2d 20 6c 65 61 64 69 6e | 67 20 62 6c 61 6e 6b 73 |- leadin|g blanks|
|00005810| 0d 70 75 74 20 31 20 69 | 6e 74 6f 20 66 69 72 73 |.put 1 i|nto firs|
|00005820| 74 43 68 61 72 0d 72 65 | 70 65 61 74 0d 69 66 20 |tChar.re|peat.if |
|00005830| 63 68 61 72 61 63 74 65 | 72 20 66 69 72 73 74 43 |characte|r firstC|
|00005840| 68 61 72 20 6f 66 20 74 | 65 78 74 4c 69 6e 65 20 |har of t|extLine |
|00005850| 69 73 20 73 70 61 63 65 | 20 74 68 65 6e 0d 70 75 |is space| then.pu|
|00005860| 74 20 66 69 72 73 74 43 | 68 61 72 20 2b 20 31 20 |t firstC|har + 1 |
|00005870| 69 6e 74 6f 20 66 69 72 | 73 74 43 68 61 72 0d 65 |into fir|stChar.e|
|00005880| 6c 73 65 0d 65 78 69 74 | 20 72 65 70 65 61 74 0d |lse.exit| repeat.|
|00005890| 65 6e 64 20 69 66 0d 65 | 6e 64 20 72 65 70 65 61 |end if.e|nd repea|
|000058a0| 74 0d 70 75 74 20 63 68 | 61 72 61 63 74 65 72 20 |t.put ch|aracter |
|000058b0| 66 69 72 73 74 43 68 61 | 72 20 74 6f 20 28 20 74 |firstCha|r to ( t|
|000058c0| 68 65 20 6c 65 6e 67 74 | 68 20 6f 66 20 74 65 78 |he lengt|h of tex|
|000058d0| 74 4c 69 6e 65 20 29 20 | c2 0d 6f 66 20 74 65 78 |tLine ) |..of tex|
|000058e0| 74 4c 69 6e 65 20 69 6e | 74 6f 20 74 65 78 74 4c |tLine in|to textL|
|000058f0| 69 6e 65 0d 0d 2d 2d 20 | 74 72 61 69 6c 69 6e 67 |ine..-- |trailing|
|00005900| 20 62 6c 61 6e 6b 73 0d | 70 75 74 20 28 20 74 68 | blanks.|put ( th|
|00005910| 65 20 6c 65 6e 67 74 68 | 20 6f 66 20 74 65 78 74 |e length| of text|
|00005920| 4c 69 6e 65 20 29 20 69 | 6e 74 6f 20 66 69 72 73 |Line ) i|nto firs|
|00005930| 74 43 68 61 72 0d 72 65 | 70 65 61 74 0d 69 66 20 |tChar.re|peat.if |
|00005940| 63 68 61 72 61 63 74 65 | 72 20 66 69 72 73 74 43 |characte|r firstC|
|00005950| 68 61 72 20 6f 66 20 74 | 65 78 74 4c 69 6e 65 20 |har of t|extLine |
|00005960| 69 73 20 73 70 61 63 65 | 20 74 68 65 6e 0d 70 75 |is space| then.pu|
|00005970| 74 20 66 69 72 73 74 43 | 68 61 72 20 2d 20 31 20 |t firstC|har - 1 |
|00005980| 69 6e 74 6f 20 66 69 72 | 73 74 43 68 61 72 0d 65 |into fir|stChar.e|
|00005990| 6c 73 65 0d 65 78 69 74 | 20 72 65 70 65 61 74 0d |lse.exit| repeat.|
|000059a0| 65 6e 64 20 69 66 0d 65 | 6e 64 20 72 65 70 65 61 |end if.e|nd repea|
|000059b0| 74 0d 70 75 74 20 63 68 | 61 72 61 63 74 65 72 20 |t.put ch|aracter |
|000059c0| 31 20 74 6f 20 28 20 66 | 69 72 73 74 43 68 61 72 |1 to ( f|irstChar|
|000059d0| 20 2d 20 31 20 29 20 6f | 66 20 74 65 78 74 4c 69 | - 1 ) o|f textLi|
|000059e0| 6e 65 20 69 6e 74 6f 20 | 74 65 78 74 4c 69 6e 65 |ne into |textLine|
|000059f0| 0d 0d 72 65 74 75 72 6e | 20 74 65 78 74 4c 69 6e |..return| textLin|
|00005a00| 65 0d 0d 65 6e 64 20 74 | 72 69 6d 42 6c 61 6e 6b |e..end t|rimBlank|
|00005a10| 73 0d 0d 0d 66 75 6e 63 | 74 69 6f 6e 20 63 6f 6e |s...func|tion con|
|00005a20| 6e 65 63 74 65 64 0d 2d | 2d 20 74 68 69 73 20 66 |nected.-|- this f|
|00005a30| 75 6e 63 74 69 6f 6e 20 | 63 68 65 63 6b 73 20 74 |unction |checks t|
|00005a40| 6f 20 73 65 65 20 69 66 | 20 77 65 20 61 72 65 20 |o see if| we are |
|00005a50| 63 6f 6e 6e 65 63 74 65 | 64 20 74 6f 20 74 68 65 |connecte|d to the|
|00005a60| 20 77 61 69 73 2d 6c 69 | 73 74 65 6e 65 72 0d 2d | wais-li|stener.-|
|00005a70| 2d 20 61 6e 64 20 72 65 | 74 75 72 6e 73 20 31 20 |- and re|turns 1 |
|00005a80| 69 66 20 77 65 20 61 72 | 65 20 61 6e 64 20 30 20 |if we ar|e and 0 |
|00005a90| 69 66 20 77 65 20 61 72 | 65 20 6e 6f 74 0d 0d 67 |if we ar|e not..g|
|00005aa0| 6c 6f 62 61 6c 20 67 57 | 61 69 73 41 64 64 72 65 |lobal gW|aisAddre|
|00005ab0| 73 73 0d 0d 69 66 20 67 | 57 61 69 73 41 64 64 72 |ss..if g|WaisAddr|
|00005ac0| 65 73 73 20 69 73 20 65 | 6d 70 74 79 20 74 68 65 |ess is e|mpty the|
|00005ad0| 6e 0d 72 65 74 75 72 6e | 20 30 0d 65 6c 73 65 0d |n.return| 0.else.|
|00005ae0| 72 65 74 75 72 6e 20 31 | 0d 65 6e 64 20 69 66 0d |return 1|.end if.|
|00005af0| 0d 65 6e 64 20 63 6f 6e | 6e 65 63 74 65 64 0d 0d |.end con|nected..|
|00005b00| 66 75 6e 63 74 69 6f 6e | 20 64 69 73 63 6f 6e 6e |function| disconn|
|00005b10| 65 63 74 65 64 0d 2d 2d | 20 74 68 69 73 20 66 75 |ected.--| this fu|
|00005b20| 6e 63 74 69 6f 6e 20 63 | 68 65 63 6b 73 20 74 6f |nction c|hecks to|
|00005b30| 20 73 65 65 20 69 66 20 | 77 65 20 61 72 65 20 64 | see if |we are d|
|00005b40| 69 73 63 6f 6e 6e 65 63 | 74 65 64 20 66 72 6f 6d |isconnec|ted from|
|00005b50| 20 74 68 65 20 77 61 69 | 73 2d 6c 69 73 74 65 6e | the wai|s-listen|
|00005b60| 65 72 0d 2d 2d 20 61 6e | 64 20 72 65 74 75 72 6e |er.-- an|d return|
|00005b70| 73 20 31 20 69 66 20 77 | 65 20 61 72 65 20 61 6e |s 1 if w|e are an|
|00005b80| 64 20 30 20 69 66 20 77 | 65 20 61 72 65 20 6e 6f |d 0 if w|e are no|
|00005b90| 74 0d 0d 67 6c 6f 62 61 | 6c 20 67 57 61 69 73 41 |t..globa|l gWaisA|
|00005ba0| 64 64 72 65 73 73 0d 0d | 69 66 20 67 57 61 69 73 |ddress..|if gWais|
|00005bb0| 41 64 64 72 65 73 73 20 | 69 73 20 6e 6f 74 20 65 |Address |is not e|
|00005bc0| 6d 70 74 79 20 61 6e 64 | 20 67 57 61 69 73 41 64 |mpty and| gWaisAd|
|00005bd0| 64 72 65 73 73 20 ad 20 | 30 20 74 68 65 6e 0d 72 |dress . |0 then.r|
|00005be0| 65 74 75 72 6e 20 30 0d | 65 6c 73 65 0d 72 65 74 |eturn 0.|else.ret|
|00005bf0| 75 72 6e 20 31 0d 65 6e | 64 20 69 66 0d 0d 65 6e |urn 1.en|d if..en|
|00005c00| 64 20 64 69 73 63 6f 6e | 6e 65 63 74 65 64 0d 0d |d discon|nected..|
|00005c10| 0d 66 75 6e 63 74 69 6f | 6e 20 68 61 6e 64 6c 65 |.functio|n handle|
|00005c20| 57 61 69 73 45 72 72 6f | 72 20 77 61 69 73 45 72 |WaisErro|r waisEr|
|00005c30| 72 6f 72 2c 20 64 69 61 | 67 73 54 65 78 74 0d 2d |ror, dia|gsText.-|
|00005c40| 2d 20 70 75 74 73 20 75 | 70 20 61 6e 20 65 72 72 |- puts u|p an err|
|00005c50| 6f 72 20 6d 65 73 73 61 | 67 65 0d 0d 72 65 74 75 |or messa|ge..retu|
|00005c60| 72 6e 20 77 61 69 73 45 | 72 72 6f 72 0d 0d 2d 2d |rn waisE|rror..--|
|00005c70| 20 68 61 6e 64 6c 65 20 | 74 68 65 20 77 61 69 73 | handle |the wais|
|00005c80| 20 65 72 72 6f 72 20 6e | 75 6d 62 65 72 20 28 6f | error n|umber (o|
|00005c90| 70 74 69 6f 6e 61 6c 29 | 0d 69 66 20 77 61 69 73 |ptional)|.if wais|
|00005ca0| 45 72 72 6f 72 20 ad 20 | 30 20 74 68 65 6e 0d 61 |Error . |0 then.a|
|00005cb0| 6e 73 77 65 72 20 22 45 | 72 72 6f 72 20 69 6e 20 |nswer "E|rror in |
|00005cc0| 77 61 69 73 2d 6c 69 73 | 74 65 6e 65 72 3a 20 22 |wais-lis|tener: "|
|00005cd0| 26 77 61 69 73 45 72 72 | 6f 72 20 77 69 74 68 20 |&waisErr|or with |
|00005ce0| 22 4f 4b 22 0d 65 6e 64 | 20 69 66 0d 0d 2d 2d 20 |"OK".end| if..-- |
|00005cf0| 68 61 6e 64 6c 65 20 74 | 68 65 20 64 69 61 67 73 |handle t|he diags|
|00005d00| 54 65 78 74 0d 69 66 20 | 64 69 61 67 73 54 65 78 |Text.if |diagsTex|
|00005d10| 74 20 69 73 20 6e 6f 74 | 20 65 6d 70 74 79 20 74 |t is not| empty t|
|00005d20| 68 65 6e 0d 61 6e 73 77 | 65 72 20 64 69 61 67 73 |hen.answ|er diags|
|00005d30| 54 65 78 74 20 77 69 74 | 68 20 22 4f 4b 22 0d 65 |Text wit|h "OK".e|
|00005d40| 6e 64 20 69 66 0d 0d 72 | 65 74 75 72 6e 20 77 61 |nd if..r|eturn wa|
|00005d50| 69 73 45 72 72 6f 72 0d | 0d 65 6e 64 20 68 61 6e |isError.|.end han|
|00005d60| 64 6c 65 57 61 69 73 45 | 72 72 6f 72 0d 0d 0d 66 |dleWaisE|rror...f|
|00005d70| 75 6e 63 74 69 6f 6e 20 | 68 61 6e 64 6c 65 44 69 |unction |handleDi|
|00005d80| 61 67 73 54 65 78 74 20 | 64 69 61 67 73 54 65 78 |agsText |diagsTex|
|00005d90| 74 0d 2d 2d 20 70 75 74 | 73 20 75 70 20 74 68 65 |t.-- put|s up the|
|00005da0| 20 64 69 61 67 6e 6f 73 | 74 69 63 73 20 74 65 78 | diagnos|tics tex|
|00005db0| 74 20 72 65 74 75 72 6e | 65 64 20 66 72 6f 6d 20 |t return|ed from |
|00005dc0| 74 68 65 0d 2d 2d 20 77 | 61 69 73 20 73 65 72 76 |the.-- w|ais serv|
|00005dd0| 65 72 0d 0d 2d 2d 20 68 | 61 6e 64 6c 65 20 74 68 |er..-- h|andle th|
|00005de0| 65 20 64 69 61 67 73 54 | 65 78 74 0d 69 66 20 64 |e diagsT|ext.if d|
|00005df0| 69 61 67 73 54 65 78 74 | 20 69 73 20 6e 6f 74 20 |iagsText| is not |
|00005e00| 65 6d 70 74 79 20 74 68 | 65 6e 0d 61 6e 73 77 65 |empty th|en.answe|
|00005e10| 72 20 64 69 61 67 73 54 | 65 78 74 20 77 69 74 68 |r diagsT|ext with|
|00005e20| 20 22 4f 4b 22 0d 65 6e | 64 20 69 66 0d 0d 72 65 | "OK".en|d if..re|
|00005e30| 74 75 72 6e 20 30 0d 0d | 65 6e 64 20 68 61 6e 64 |turn 0..|end hand|
|00005e40| 6c 65 44 69 61 67 73 54 | 65 78 74 0d 0d 0d 66 75 |leDiagsT|ext...fu|
|00005e50| 6e 63 74 69 6f 6e 20 63 | 68 65 63 6b 46 6f 6c 64 |nction c|heckFold|
|00005e60| 65 72 73 0d 0d 2d 2d 20 | 77 61 69 73 20 66 6f 6c |ers..-- |wais fol|
|00005e70| 64 65 72 73 0d 67 6c 6f | 62 61 6c 20 57 61 69 73 |ders.glo|bal Wais|
|00005e80| 53 6f 75 72 63 65 73 46 | 6f 6c 64 65 72 0d 67 6c |SourcesF|older.gl|
|00005e90| 6f 62 61 6c 20 57 61 69 | 73 44 6f 63 75 6d 65 6e |obal Wai|sDocumen|
|00005ea0| 74 73 46 6f 6c 64 65 72 | 0d 67 6c 6f 62 61 6c 20 |tsFolder|.global |
|00005eb0| 57 61 69 73 51 75 65 73 | 74 69 6f 6e 73 46 6f 6c |WaisQues|tionsFol|
|00005ec0| 64 65 72 0d 0d 2d 2d 20 | 67 65 74 20 6f 75 72 20 |der..-- |get our |
|00005ed0| 63 75 72 72 65 6e 74 20 | 70 72 65 66 65 72 65 6e |current |preferen|
|00005ee0| 63 65 73 0d 70 75 74 20 | 63 61 72 64 20 66 69 65 |ces.put |card fie|
|00005ef0| 6c 64 20 22 77 61 69 73 | 2d 73 6f 75 72 63 65 73 |ld "wais|-sources|
|00005f00| 22 20 6f 66 20 63 61 72 | 64 20 22 65 64 69 74 5f |" of car|d "edit_|
|00005f10| 70 72 65 66 65 72 65 6e | 63 65 73 22 20 69 6e 74 |preferen|ces" int|
|00005f20| 6f 20 57 61 69 73 53 6f | 75 72 63 65 73 46 6f 6c |o WaisSo|urcesFol|
|00005f30| 64 65 72 0d 70 75 74 20 | 63 61 72 64 20 66 69 65 |der.put |card fie|
|00005f40| 6c 64 20 22 77 61 69 73 | 2d 64 6f 63 75 6d 65 6e |ld "wais|-documen|
|00005f50| 74 73 22 20 6f 66 20 63 | 61 72 64 20 22 65 64 69 |ts" of c|ard "edi|
|00005f60| 74 5f 70 72 65 66 65 72 | 65 6e 63 65 73 22 20 69 |t_prefer|ences" i|
|00005f70| 6e 74 6f 20 57 61 69 73 | 44 6f 63 75 6d 65 6e 74 |nto Wais|Document|
|00005f80| 73 46 6f 6c 64 65 72 0d | 70 75 74 20 63 61 72 64 |sFolder.|put card|
|00005f90| 20 66 69 65 6c 64 20 22 | 77 61 69 73 2d 71 75 65 | field "|wais-que|
|00005fa0| 73 74 69 6f 6e 73 22 20 | 6f 66 20 63 61 72 64 20 |stions" |of card |
|00005fb0| 22 65 64 69 74 5f 70 72 | 65 66 65 72 65 6e 63 65 |"edit_pr|eference|
|00005fc0| 73 22 20 69 6e 74 6f 20 | 57 61 69 73 51 75 65 73 |s" into |WaisQues|
|00005fd0| 74 69 6f 6e 73 46 6f 6c | 64 65 72 0d 0d 2d 2d 20 |tionsFol|der..-- |
|00005fe0| 66 69 72 73 74 20 63 68 | 65 63 6b 20 74 6f 20 73 |first ch|eck to s|
|00005ff0| 65 65 20 69 66 20 74 68 | 65 73 65 20 66 6f 6c 64 |ee if th|ese fold|
|00006000| 65 72 73 20 65 78 69 73 | 74 0d 69 66 20 74 68 65 |ers exis|t.if the|
|00006010| 72 65 20 69 73 20 61 20 | 66 6f 6c 64 65 72 20 57 |re is a |folder W|
|00006020| 61 69 73 53 6f 75 72 63 | 65 73 46 6f 6c 64 65 72 |aisSourc|esFolder|
|00006030| 20 74 68 65 6e 0d 70 75 | 74 20 31 20 69 6e 74 6f | then.pu|t 1 into|
|00006040| 20 73 6f 75 72 63 65 73 | 46 6f 6c 64 65 72 4f 6b | sources|FolderOk|
|00006050| 0d 65 6c 73 65 0d 70 75 | 74 20 30 20 69 6e 74 6f |.else.pu|t 0 into|
|00006060| 20 73 6f 75 72 63 65 73 | 46 6f 6c 64 65 72 4f 6b | sources|FolderOk|
|00006070| 0d 65 6e 64 20 69 66 0d | 0d 69 66 20 74 68 65 72 |.end if.|.if ther|
|00006080| 65 20 69 73 20 61 20 66 | 6f 6c 64 65 72 20 57 61 |e is a f|older Wa|
|00006090| 69 73 44 6f 63 75 6d 65 | 6e 74 73 46 6f 6c 64 65 |isDocume|ntsFolde|
|000060a0| 72 20 74 68 65 6e 0d 70 | 75 74 20 31 20 69 6e 74 |r then.p|ut 1 int|
|000060b0| 6f 20 64 6f 63 75 6d 65 | 6e 74 73 46 6f 6c 64 65 |o docume|ntsFolde|
|000060c0| 72 4f 6b 0d 65 6c 73 65 | 0d 70 75 74 20 30 20 69 |rOk.else|.put 0 i|
|000060d0| 6e 74 6f 20 64 6f 63 75 | 6d 65 6e 74 73 46 6f 6c |nto docu|mentsFol|
|000060e0| 64 65 72 4f 6b 0d 65 6e | 64 20 69 66 0d 0d 69 66 |derOk.en|d if..if|
|000060f0| 20 74 68 65 72 65 20 69 | 73 20 61 20 66 6f 6c 64 | there i|s a fold|
|00006100| 65 72 20 57 61 69 73 51 | 75 65 73 74 69 6f 6e 73 |er WaisQ|uestions|
|00006110| 46 6f 6c 64 65 72 20 74 | 68 65 6e 0d 70 75 74 20 |Folder t|hen.put |
|00006120| 31 20 69 6e 74 6f 20 71 | 75 65 73 74 69 6f 6e 73 |1 into q|uestions|
|00006130| 46 6f 6c 64 65 72 4f 6b | 0d 65 6c 73 65 0d 70 75 |FolderOk|.else.pu|
|00006140| 74 20 30 20 69 6e 74 6f | 20 71 75 65 73 74 69 6f |t 0 into| questio|
|00006150| 6e 73 46 6f 6c 64 65 72 | 4f 6b 0d 65 6e 64 20 69 |nsFolder|Ok.end i|
|00006160| 66 0d 0d 2d 2d 20 67 72 | 61 62 20 74 68 65 20 70 |f..-- gr|ab the p|
|00006170| 61 74 68 20 6e 61 6d 65 | 20 6f 66 20 74 68 65 20 |ath name| of the |
|00006180| 73 74 61 63 6b 0d 70 75 | 74 20 77 6f 72 64 20 32 |stack.pu|t word 2|
|00006190| 20 6f 66 20 74 68 65 20 | 6c 6f 6e 67 20 6e 61 6d | of the |long nam|
|000061a0| 65 20 6f 66 20 74 68 69 | 73 20 73 74 61 63 6b 20 |e of thi|s stack |
|000061b0| 69 6e 74 6f 20 70 61 74 | 68 4e 61 6d 65 0d 70 75 |into pat|hName.pu|
|000061c0| 74 20 74 68 65 20 6c 65 | 6e 67 74 68 20 6f 66 20 |t the le|ngth of |
|000061d0| 70 61 74 68 4e 61 6d 65 | 20 2d 20 31 20 69 6e 74 |pathName| - 1 int|
|000061e0| 6f 20 70 61 74 68 4e 61 | 6d 65 4c 65 6e 67 74 68 |o pathNa|meLength|
|000061f0| 0d 70 75 74 20 63 68 61 | 72 61 63 74 65 72 20 32 |.put cha|racter 2|
|00006200| 20 74 6f 20 70 61 74 68 | 4e 61 6d 65 4c 65 6e 67 | to path|NameLeng|
|00006210| 74 68 20 6f 66 20 70 61 | 74 68 4e 61 6d 65 20 69 |th of pa|thName i|
|00006220| 6e 74 6f 20 70 61 74 68 | 4e 61 6d 65 0d 0d 0d 2d |nto path|Name...-|
|00006230| 2d 20 67 72 61 62 20 74 | 68 65 20 6c 65 6e 67 74 |- grab t|he lengt|
|00006240| 68 20 6f 66 20 74 68 65 | 20 6e 61 6d 65 20 6f 66 |h of the| name of|
|00006250| 20 74 68 65 20 73 74 61 | 63 6b 0d 70 75 74 20 77 | the sta|ck.put w|
|00006260| 6f 72 64 20 32 20 6f 66 | 20 74 68 65 20 6e 61 6d |ord 2 of| the nam|
|00006270| 65 20 6f 66 20 74 68 69 | 73 20 73 74 61 63 6b 20 |e of thi|s stack |
|00006280| 69 6e 74 6f 20 73 74 61 | 63 6b 4e 61 6d 65 0d 70 |into sta|ckName.p|
|00006290| 75 74 20 74 68 65 20 6c | 65 6e 67 74 68 20 6f 66 |ut the l|ength of|
|000062a0| 20 73 74 61 63 6b 4e 61 | 6d 65 20 69 6e 74 6f 20 | stackNa|me into |
|000062b0| 73 74 61 63 6b 4e 61 6d | 65 4c 65 6e 67 74 68 0d |stackNam|eLength.|
|000062c0| 0d 70 75 74 20 70 61 74 | 68 4e 61 6d 65 4c 65 6e |.put pat|hNameLen|
|000062d0| 67 74 68 20 2d 20 73 74 | 61 63 6b 4e 61 6d 65 4c |gth - st|ackNameL|
|000062e0| 65 6e 67 74 68 20 69 6e | 74 6f 20 70 61 74 68 4e |ength in|to pathN|
|000062f0| 61 6d 65 4c 65 6e 67 74 | 68 0d 70 75 74 20 63 68 |ameLengt|h.put ch|
|00006300| 61 72 61 63 74 65 72 20 | 31 20 74 6f 20 70 61 74 |aracter |1 to pat|
|00006310| 68 4e 61 6d 65 4c 65 6e | 67 74 68 20 2b 20 31 20 |hNameLen|gth + 1 |
|00006320| 6f 66 20 70 61 74 68 4e | 61 6d 65 20 69 6e 74 6f |of pathN|ame into|
|00006330| 20 70 61 74 68 4e 61 6d | 65 0d 0d 0d 69 66 20 73 | pathNam|e...if s|
|00006340| 6f 75 72 63 65 73 46 6f | 6c 64 65 72 4f 6b 20 3d |ourcesFo|lderOk =|
|00006350| 20 30 20 74 68 65 6e 0d | 70 75 74 20 70 61 74 68 | 0 then.|put path|
|00006360| 4e 61 6d 65 20 26 20 22 | 77 61 69 73 2d 73 6f 75 |Name & "|wais-sou|
|00006370| 72 63 65 73 22 20 69 6e | 74 6f 20 57 61 69 73 53 |rces" in|to WaisS|
|00006380| 6f 75 72 63 65 73 46 6f | 6c 64 65 72 0d 69 66 20 |ourcesFo|lder.if |
|00006390| 74 68 65 72 65 20 69 73 | 20 61 20 66 6f 6c 64 65 |there is| a folde|
|000063a0| 72 20 57 61 69 73 53 6f | 75 72 63 65 73 46 6f 6c |r WaisSo|urcesFol|
|000063b0| 64 65 72 20 74 68 65 6e | 0d 70 75 74 20 57 61 69 |der then|.put Wai|
|000063c0| 73 53 6f 75 72 63 65 73 | 46 6f 6c 64 65 72 20 69 |sSources|Folder i|
|000063d0| 6e 74 6f 20 63 61 72 64 | 20 66 69 65 6c 64 20 22 |nto card| field "|
|000063e0| 77 61 69 73 2d 73 6f 75 | 72 63 65 73 22 20 c2 0d |wais-sou|rces" ..|
|000063f0| 6f 66 20 63 61 72 64 20 | 22 65 64 69 74 5f 70 72 |of card |"edit_pr|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.